nvim: init.vim: Switch to skim from fzf

This commit is contained in:
Sanchayan Maity 2019-11-18 12:25:56 +05:30 committed by Sanchayan Maity
parent 87db61b102
commit d8faed50e3

View file

@ -9,8 +9,8 @@ Plug 'ervandew/supertab'
" of words.
Plug 'easymotion/vim-easymotion'
" Fuzzy file search
"Plug '~/.fzf'
Plug 'junegunn/fzf.vim'
Plug 'lotabout/skim', { 'dir': '~/.skim', 'do': './install' }
Plug 'lotabout/skim.vim'
" Remove extraneous whitespace when edit mode is exited
Plug 'thirtythreeforty/lessspace.vim'
" Status bar mods
@ -139,7 +139,6 @@ set fileformat=unix
set clipboard^=unnamed,unnamedplus
set completeopt=menuone,preview,noinsert
set rtp+=/usr/bin/fzf
" Theme
syntax enable
@ -161,15 +160,18 @@ nnoremap <Leader>pd :PlugUpdate<CR>
nnoremap <Leader>pc :PlugClean<CR>
" Open NerdTree
nnoremap <Leader>ee :NERDTree<CR>
" For fzf
nnoremap <Leader>vf :Files<CR>
nnoremap <Leader>vg :GFiles<CR>
nnoremap <Leader>vb :Buffers<CR>
nnoremap <Leader>vL :Lines<CR>
nnoremap <Leader>vl :BLines<CR>
nnoremap <Leader>vt :Tags<CR>
nnoremap <Leader>vc :Bcommits<CR>
nnoremap <Leader>va :Commits<CR>
" For skim
nnoremap <Leader>vf :Files<CR>
nnoremap <Leader>vg :GFiles<CR>
nnoremap <Leader>vb :Buffers<CR>
nnoremap <Leader>vL :Lines<CR>
nnoremap <Leader>vl :BLines<CR>
nnoremap <Leader>vt :BTags<CR>
nnoremap <Leader>vT :Tags<CR>
nnoremap <Leader>vc :BCommits<CR>
nnoremap <Leader>va :Commits<CR>
nnoremap <Leader>vch :History:<CR>
nnoremap <Leader>vsh :History/<CR>
" Use ripgrep to search for content in files
nnoremap <Leader>/ :Rg<CR>
nnoremap <Leader>b :ls<CR>:b<Space>
@ -390,7 +392,7 @@ vmap <Leader>os :call SwoopSelection()<CR>
nmap <Leader>om :call SwoopMulti()<CR>
vmap <Leader>om :call SwoopMultiSelection()<CR>
" CScope & fzf integration
" CScope & skim integration
" Taken from https://gist.github.com/amitab/cd051f1ea23c588109c6cfcb7d1d5776
" However, the above gist has completely wrong mappings
function! Cscope(option, query)
@ -407,7 +409,7 @@ function! Cscope(option, query)
let file = split(data[0], ":")
execute 'e ' . '+' . file[1] . ' ' . file[0]
endfunction
call fzf#run(opts)
call skim#run(opts)
endfunction
function! CscopeQuery(option)