1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

vim: add FZF and NERDTree <leader>.. keybinds

This commit is contained in:
Joe Groocock 2018-03-31 21:52:02 +01:00
parent 1f8272d259
commit 7bbe3f07c0
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -38,6 +38,8 @@ set updatetime=500 " reduce delay from 4s default
" te seems like the correct shorthand, not tabe " te seems like the correct shorthand, not tabe
cmap te tabedit cmap te tabedit
let mapleader="\<space>"
" Autosave settings " Autosave settings
function! SaveIfExist() function! SaveIfExist()
if @% != "" && filereadable(@%) && !&readonly if @% != "" && filereadable(@%) && !&readonly
@ -93,6 +95,7 @@ Plugin 'chr4/nginx.vim'
Plugin 'PotatoesMaster/i3-vim-syntax' Plugin 'PotatoesMaster/i3-vim-syntax'
Plugin 'lervag/vimtex' Plugin 'lervag/vimtex'
Plugin 'JamshedVesuna/vim-markdown-preview' Plugin 'JamshedVesuna/vim-markdown-preview'
Plugin 'junegunn/fzf.vim'
call vundle#end() call vundle#end()
@ -138,6 +141,12 @@ let g:tagbar_show_linenumbers = 1
let g:tagbar_singleclick = 1 let g:tagbar_singleclick = 1
let g:tagbar_autopreview = 1 let g:tagbar_autopreview = 1
" NERDTree configuration
map <leader><space> :NERDTreeToggle<CR>
" FZF configurationn
map <leader><tab> :Files<CR>
" Disable mouse " Disable mouse
set mouse=nicr set mouse=nicr
nnoremap <LeftMouse> <nop> nnoremap <LeftMouse> <nop>
@ -147,7 +156,6 @@ nnoremap <RightMouse> <nop>
inoremap <C-Space> <C-x><C-o> inoremap <C-Space> <C-x><C-o>
inoremap <C-@> <C-Space> inoremap <C-@> <C-Space>
let mapleader="\<space>"
" Unbind arrow keys " Unbind arrow keys
for prefix in ['n', 'v'] for prefix in ['n', 'v']
for key in ['<Up>', '<Down>', '<Left>', '<Right>'] for key in ['<Up>', '<Down>', '<Left>', '<Right>']
@ -235,6 +243,8 @@ if (exists("g:use_dvorak") && g:use_dvorak == 1)
\ 'x': ['tsd', 'tsD'], \ 'x': ['tsd', 'tsD'],
\} \}
let NERDTreeMapOpenInTab='\t'
endif endif
" Save aliases. " Save aliases.