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 c308fe09c5
commit fc256a3f4f
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -35,6 +35,8 @@ set scrolloff=6
set nojoinspaces set nojoinspaces
set updatetime=500 " reduce delay from 4s default set updatetime=500 " reduce delay from 4s default
let mapleader="\<space>"
" Autosave settings " Autosave settings
function! SaveIfExist() function! SaveIfExist()
if @% != "" && filereadable(@%) && !&readonly if @% != "" && filereadable(@%) && !&readonly
@ -90,6 +92,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()
@ -135,6 +138,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>
@ -144,7 +153,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>']
@ -232,6 +240,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.