Przeglądaj źródła

Added fzf to vimrc

Viktor Grahn 4 lat temu
rodzic
commit
3045c513b1
1 zmienionych plików z 17 dodań i 0 usunięć
  1. 17 0
      .vimrc

+ 17 - 0
.vimrc

@@ -25,6 +25,8 @@ Plug 'dense-analysis/ale'
 Plug 'maximbaz/lightline-ale'
 Plug 'preservim/tagbar'
 Plug 'vim-php/tagbar-phpctags.vim'
+Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+Plug 'junegunn/fzf.vim'
 call plug#end()
 		
 filetype plugin indent on
@@ -185,3 +187,18 @@ map <C-l>p :cprevious<CR>
 nnoremap <C-l>c :cclose<CR>
 
 nmap <Space>t :TagbarToggle<CR>
+nmap <Space>f :Files<CR>
+nmap <Space>r :Rg<CR>
+
+function! PrettyXML()
+  set filetype=xml
+  silent %!xmllint --format --encode UTF-8 --recover - 2>/dev/null
+endfunction
+
+function! PrettyJSON()
+  set filetype=json
+  silent %!python3 -m json.tool
+endfunction
+
+command! PrettyXml call PrettyXML()
+command! PrettyJson call PrettyJSON()