Replaced split-open function with new plugin
This commit is contained in:
parent
aee6238110
commit
2ca163d51d
1 changed files with 3 additions and 15 deletions
18
vim/vimrc
18
vim/vimrc
|
@ -42,6 +42,8 @@ Plug 'skywind3000/asyncrun.vim'
|
|||
Plug 'markonm/traces.vim'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
|
||||
Plug 'mandlm/vim-split-open'
|
||||
|
||||
call plug#end()
|
||||
" }}}
|
||||
|
||||
|
@ -113,22 +115,8 @@ nmap <C-P> :Files<CR>
|
|||
nmap <C-F> :Rg \b<C-R><C-W>\b<CR>
|
||||
nmap <ESC><C-P> :Tags<CR>
|
||||
|
||||
function SplitOpenFile(filename)
|
||||
execute("tabedit " . a:filename)
|
||||
let l:file_extension = tolower(fnamemodify(a:filename, ":e"))
|
||||
if l:file_extension == "cpp"
|
||||
execute("FSSplitLeft")
|
||||
execute("wincmd l")
|
||||
elseif l:file_extension == "h"
|
||||
execute("FSSplitRight")
|
||||
execute("wincmd h")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command -nargs=1 SplitOpen :call SplitOpenFile("<args>")
|
||||
|
||||
let g:fzf_action= {
|
||||
\ 'ctrl-t': 'tab drop',
|
||||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-s': 'SplitOpen',
|
||||
\ 'ctrl-x': 'split',
|
||||
\ 'ctrl-v': 'vsplit' }
|
||||
|
|
Loading…
Reference in a new issue