Add c-o to vimrc

master
Jonathan Hodgson 7 years ago
parent f1e211ac3c
commit 53270a0bd7
  1. 17
      .vimrc

@ -12,6 +12,7 @@ filetype plugin indent on
call pathogen#infect()
call pathogen#helptags()
"Leaders {{{1
let mapleader = ","
let maplocalleader = "\\"
@ -294,6 +295,20 @@ function! NewLatex()
setlocal filetype=tex
endfunction
" Strip the newline from the end of a string
function! Chomp(str)
return substitute(a:str, '\n$', '', '')
endfunction
" Find a file and pass it to cmd
function! DmenuOpen(cmd)
let fname = Chomp(system("git ls-files | rofi -dmenu -i -l 20 -p " . a:cmd))
if empty(fname)
return
endif
execute a:cmd . " " . fname
endfunction
" Commands {{{1
"gets the wp salts
@ -314,6 +329,8 @@ nnoremap <F7> :set spell!<cr>
noremap <ScrollWheelUp> <nop>
noremap <ScrollWheelDown> <nop>
nnoremap <c-o> :call DmenuOpen("e")<cr>
" Make Ctrl C and Ctrl V work on system buffer
" if in visual or insert mode respectively
vnoremap <C-c> "+y

Loading…
Cancel
Save