You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
dotfiles/nvim/init.vim

148 lines
3.1 KiB

call plug#begin('~/local/share/nvim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'editorconfig/editorconfig-vim'
" Fzf
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'mattn/emmet-vim'
" NERDTree
Plug 'scrooloose/nerdtree'
" Improvements
Plug 'terryma/vim-multiple-cursors'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-surround'
Plug 'scrooloose/syntastic'
Plug 'jiangmiao/auto-pairs'
"Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'prabirshrestha/vim-lsp'
" Themes
Plug 'tomasr/molokai'
Plug 'gko/vim-coloresque'
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'joshdick/onedark.vim'
" Lang. Support
Plug 'fatih/vim-go'
Plug 'artur-shaik/vim-javacomplete2'
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
Plug 'rust-lang/rust.vim'
Plug 'preservim/nerdcommenter'
" Writing
Plug 'junegunn/goyo.vim'
Plug 'lervag/vimtex'
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
"Zoxide
Plug 'nanotee/zoxide.vim'
" Vim Wiki
Plug 'vimwiki/vimwiki'
Plug 'mattn/calendar-vim'
" Animate
Plug 'camspiers/animate.vim'
Plug 'camspiers/lens.vim'
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
" Git
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'ryanoasis/vim-devicons'
call plug#end()
"let g:molokai_original = 1
let g:airline_theme='onedark'
let g:ale_enable=0
syntax on
filetype plugin indent on
set shiftwidth=4
set softtabstop=4
set tabstop=4
set expandtab
set number relativenumber
colorscheme onedark
set nocompatible
set encoding=UTF-8
let g:livepreview_previewer = 'zathura'
set mouse=a
" Map Leader
let mapleader = ","
" Note taking (Mardown, Spelling)
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
:map <F11> :setlocal spell! spelllang=en_gb<CR>
au BufNewFile ~/vimwiki/diary/*.md :silent 0r !~/.config/nvim/generate-vimwiki-diary-template '%'
let NERDTreeMapOpenInTab='<ENTER>'
let g:fzf_nvim_statusline = 0 " disable statusline overwriting
"remaps for fzf
nnoremap <silent> <leader><space> :Files<CR>
nnoremap <silent> <leader>w :Windows<CR>
nnoremap <silent> <leader>h :History<CR>
nnoremap <silent> <leader>g<space> :GFiles<CR>
nnoremap <silent> <leader>gs :GFiles?<CR>
" Switching windows
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l
" Move tabs
nnoremap <A-J> :tabp<CR>
nnoremap <A-K> :tabn<CR>
" Basic cmd commands
nnoremap <A-o> :!touch<Space>
nnoremap <A-e> :tabe<Space>
nnoremap <A-v> :vsplit<Space>
" Screenshot command
nnoremap <silent> <leader>s :!bash /home/simon/.scripts/vscrnpaste<CR><CR>
" Terminal Maps
tnoremap <Esc> <C-\><C-n>
nnoremap <leader>t :tabedit term://bash<CR>
autocmd BufEnter * silent! lcd %:p:h
" Indents
vmap < <gv
vmap > >gv
" Open NERDTree
nnoremap <leader>n :NERDTreeToggle<CR>
" Vimwiki md2html
let g:vimwiki_list = [{
\ 'path': '~/vimwiki',
\ 'template_path': '~/vimwiki/templates/',
\ 'template_default': 'default',
\ 'syntax': 'markdown',
\ 'ext': '.md',
\ 'path_html': '~/vimwiki/site_html/',
\ 'custom_wiki2html': 'vimwiki_markdown',
\ 'template_ext': '.tpl'}]