Updated plugins and keyboard mappings

This commit is contained in:
Jono Targett 2022-01-13 18:19:07 +10:30
parent d45bebc103
commit 70d7a1d880
2 changed files with 15 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Plug 'scrooloose/nerdtree'
"#Plug 'tpope/vim-eunuch'
"#Plug 'tpope/vim-surround'
"#Plug 'w0rp/ale'
Plug 'ap/vim-buftabline'
call plug#end()

15
.vimrc
View File

@ -3,18 +3,31 @@ syntax on
so ~/.vim/plugins.vim
" Always start with NERDTree open
autocmd vimenter * NERDTree
map <C-n> :NERDTreeToggle<CR>
" Show/hide NERDTree with Ctrl+T
map <C-t> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
" Close a buffer with Ctrl+C
map <C-c> :BD<cr>
" Save files with Ctrl+S
nmap <c-s> :w<cr>
imap <c-s> <Esc>:w<cr>a
" Allow arrow keys to wrap lines instead of getting stuck >:(
set whichwrap+=<,>,[,]
" Always show hidden files in NERDTree
let NERDTreeShowHidden=1
" Recommended settings for vim-buftabline
set hidden
nnoremap <C-N> :bnext<CR>
nnoremap <C-P> :bprev<CR>