diff --git a/VimSetup.rc b/VimSetup.rc index 4115b50..5036023 100644 --- a/VimSetup.rc +++ b/VimSetup.rc @@ -1,6 +1,13 @@ +" let g:ycm_path_to_python_interpreter="/usr/local/bin/python3" +" let g:ycm_path_to_python_interpreter="/usr/bin/python" + +let g:python_host_prog = '/usr/bin/python' +" let g:python_host_prog = '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' + + " Loads bundles -execute pathogen#infect() +" execute pathogen#infect() " Make vim behave like vim rather than like vi @@ -21,9 +28,9 @@ " "set makeprg=xcodebuild -" Ctrl-M shortcut to execute make +" Shift-M shortcut to execute make set makeprg=make -map :make +map :make:copen " SVN related integration " Ctrl-D to diff working copy @@ -32,12 +39,36 @@ " Ctrl-S to list repository status " Ctrl-L to list current directory " Enter when over item in the list, it opens it -map :set splitright \| vnew \| r!svn cat #:windo :diffthis1G -map :q! -map :!svn commit --editor-cmd vim %:p -map :new \| r!svn st `svn info --show-item wc-root` \| sort -r1G -map :new \| r!ls -la1G -map $bgf +map :diffthis:set splitright \| vnew DiffView \| r!svn cat #:diffthisW1G +map :q!:SideView +" map :!svn commit --editor-cmd vi %:p +map :term svn commit %:p +map :!svn add %:p +map :15new \| r!svn st `svn info --show-item wc-root` \| sort -r1G +map :SideView1GGd:r!echo .. && find ./* -maxdepth 01G +map :SideView1GGd:r!make project1Gdd:set nowrap:set cursorline + +" Terminal window +" map ~ :15new:term bash +map ~ :ToggleTerm +tnoremap ~ :ToggleTerm +"tnoremap +"tnoremap :ToggleTerm + +" set splitright +" map $bgf:tabprevious^:tabnext +" map $b:q:set splitrightvgf^:vert resize 27:set nosplitright +" map $b:exec("Open ".expand()) +map $b:exec "Open " . expand("") +" :q:set splitrightvgf^:vert resize 27:set nosplitright + +" r + +"w:vert resize 25:new r!make project1G:set nowrapw + +" :tabprevious^:tabnext +" + " Get SVN log on current file: " map :new \| r!svn log #1G @@ -54,16 +85,24 @@ let g:BASH_Email = $USER_EMAIL let g:BASH_Company = $USER_COMPANY + " " Appearance settings " set guifont=Monaco:h13 -syn on -colorscheme obsidian +" syn on +" colorscheme obsidian " colorscheme chlordane " colorscheme colors +" +" Setup the plugin manager, use with :Plug +call plug#begin('~/.vim/plugged') +Plug 'dbgx/lldb.nvim' +call plug#end() +" UpdateRemotePlugins + " My personal preference on Mac with no PgUp/PgDn " Don't need up,down,left,right mapping if have arrow keys so make these keys more useful @@ -89,11 +128,75 @@ map :qa! " Next/Prev error in list -map :cn -map :cp map :cn map :cp +" Next/Prev location of tag +map :tn +map :tp + +" Tag navigation +" +" preview tag in a split view: +" map :exec("ptag ".expand("")) +" close preview split view: +" :pc +" lists definitions of a tag to choose between: +" map :exec("tjump ".expand("")) +" lists definitions and then show selected one in preview window: +" map :exec("ptjump ".expand("")) + +" :tselect +" :stselect +" :stjump +" :ptnext +" :ptprevious +" :tag / +" +" CSCOPE: +" :map :cscope find c + +set cst " This replaces tag support with cscope, +" but actually want both, 'space' for tags, 'Ctrl-space' for cscope +set csto=0 +set nocsverb + +" Assuming cscope output is in the current directory +" add any database in current directory +if filereadable("cscope.out") + cs add cscope.out +" else add database pointed to by environment +elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB +endif +set csverb + +" split versions: +" nmap s :scs find s =expand("") +nmap s :cs find s =expand("") +nmap g :cs find g =expand("") +nmap c :cs find c =expand("") +nmap t :cs find t =expand("") +nmap e :cs find e =expand("") +nmap f :cs find f =expand("") +nmap i :cs find i ^=expand("")$ +nmap d :cs find d =expand("") +nmap a :cs find a =expand("") +" usage: +" :cscope find