VIM is now an IDE
This commit is contained in:
parent
a8916b3694
commit
016e54ff34
40
.vimrc
40
.vimrc
|
@ -15,7 +15,7 @@ call plug#begin()
|
|||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
||||
"Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
||||
Plug 'jpalardy/vim-slime'
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
|
@ -34,11 +34,45 @@ let g:deoplete#enable_at_startup = 1
|
|||
|
||||
set tags+=./.tags
|
||||
|
||||
|
||||
" Session management
|
||||
|
||||
set switchbuf=useopen,usetab
|
||||
|
||||
|
||||
fu! SaveSess()
|
||||
execute 'mksession! ' . getcwd() . '/.session.vim'
|
||||
endfunction
|
||||
|
||||
fu! RestoreSess()
|
||||
if filereadable(getcwd() . '/.session.vim')
|
||||
let initial_args = argv()
|
||||
execute 'so ' . getcwd() . '/.session.vim'
|
||||
for file in initial_args
|
||||
if bufloaded(file) != 1
|
||||
execute 'tabnew ' . getcwd() . '/' . file
|
||||
else
|
||||
execute 'sb ' . file
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Save session on quitting Vim
|
||||
autocmd VimLeave * NERDTreeTabsClose
|
||||
autocmd VimLeave * call SaveSess()
|
||||
|
||||
" Restore session on starting Vim
|
||||
autocmd VimEnter * nested call RestoreSess()
|
||||
|
||||
"----------------------
|
||||
|
||||
" move between tabs
|
||||
nnoremap <A-Left> :tabprevious<CR>
|
||||
nnoremap <A-Right> :tabnext<CR>
|
||||
nnoremap <A-Left> :tabprevious<CR>
|
||||
nnoremap <A-Right> :tabnext<CR>
|
||||
|
||||
|
||||
map <C-n> :NERDTreeMirrorToggle<CR>
|
||||
|
||||
" prevent mouse vanishing
|
||||
set nomousehide
|
||||
|
|
Loading…
Reference in New Issue