diff options
Diffstat (limited to 'nvim/init.vim')
| -rw-r--r-- | nvim/init.vim | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/nvim/init.vim b/nvim/init.vim new file mode 100644 index 0000000..b510107 --- /dev/null +++ b/nvim/init.vim @@ -0,0 +1,108 @@ +set nu +set ff=unix +set colorcolumn=80 + +"let g:python3_host_prog='D:/Progams/Python/python.exe' + +call plug#begin('~/.vim/plugged') + +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'scrooloose/nerdcommenter' +Plug 'godlygeek/tabular' + +Plug 'xuyuanp/nerdtree-git-plugin' +Plug 'tpope/vim-fugitive' + +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } + +Plug 'Shougo/denite.nvim' +Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +Plug 'Shougo/echodoc.vim' + +Plug 'xolox/vim-misc' +Plug 'xolox/vim-lua-ftplugin' +Plug 'VaiN474/vim-etlua' +Plug 'leafo/moonscript-vim' +Plug 'teal-language/vim-teal' + +Plug 'whonore/Coqtail' + +"Plug 'joshdick/onedark.vim' +Plug 'cocopon/iceberg.vim' +call plug#end() + +colorscheme iceberg + +"deoplete +let g:deoplete#enable_at_startup = 1 +inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>" + +"lua +let g:lua_compiler_name='luajit' +"let g:lua_compiler_name='lua' +let g:lua_complete_dynamic=1 +au BufReadPost *.busted set syntax=lua +au BufReadPost *.spec set syntax=lua +au BufReadPost *.etlua set syntax=html +let g:echodoc#enable_at_startup=1 + +"NERDTree config +autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | + \ quit | endif + +nnoremap <C-\> :NERDTreeToggle<Cr> +nnoremap <C-r> :NERDTreeFind<Cr> +let NERDTreeMapHelp='y' +let NERDTreeMapJumpLastChild='y' +let NERDTreeMapJumpFirstChild='y' + +"Fuzzy file search +let g:fzf_layout = { 'window': {'width': 0.9, 'height': 0.6} } +noremap <A-p> :call fzf#run(fzf#wrap({'sink': 'tabe', 'left': '20%', 'source': 'git ls-files'}))<Cr> +noremap <C-p> :call fzf#run(fzf#wrap({'sink': 'vsplit', 'left': '50%', 'source': 'git ls-files'}))<Cr> + +"ctrl+s saves +nmap <C-s> :w<Cr> + +"For some reason this is different between linux and windows +if has('win32') + vmap <C-/> <leader>c<Space> +else + vmap <C-_> <leader>c<Space> +endif + +"Move around quickly +nnoremap J 5j +nnoremap K 5k +nnoremap H 5h +nnoremap L 5l + +"Navigate splits +tnoremap <A-h> <C-\><C-n><C-w>h +tnoremap <A-j> <C-\><C-n><C-w>j +tnoremap <A-k> <C-\><C-n><C-w>k +tnoremap <A-l> <C-\><C-n><C-w>l + +nnoremap <A-h> <C-\><C-n><C-w>h +nnoremap <A-j> <C-\><C-n><C-w>j +nnoremap <A-k> <C-\><C-n><C-w>k +nnoremap <A-l> <C-\><C-n><C-w>l + +"Resize splits +noremap <C-h> :vertical resize -5<Cr> +noremap <C-l> :vertical resize +5<Cr> +noremap <C-j> :res +5<Cr> +noremap <C-k> :res -5<Cr> + +"Navigate tabs +noremap <A-]> gt +noremap <A-[> gT + +"Add a semicolon at the nd of the line +vnoremap <C-;> :s/\([^;]\)$/\1;/g<Cr> + +"Build in a vertical split +noremap <C-b> :vsplit<CR>:terminal make<CR> + +filetype plugin indent on +syntax enable |
