" .vimrc
" of all places, started using gvim on ms-windows...
"
" important notes for this vimrc
"
" * using this vimrc with a portable installation of gvim
"
" * if GVimPortable was started via GVimPortable.bat.lnk, then $HOME
" should already point to the correct location -- this is how $HOME
" is set so that it is not dependent on the underlying OS remembering
" anything about it (consequence of desiring a portable set-up)
"
" * using NTFS hardlinks to relocate the data directory outside of the
" portable application installation directory (trying to keep
" applications and data separate)
"
" * this vimrc 'depends' on:
"
" mru.vim
" taglist.vim (and exhuberant ctags)
" winmanager.vim
" ColorSamplePack.vim
" confirmQuit.vim
" minibuffexpl.vim
"
" still trying to learn how to / wish list:
"
" * evaluate current line (or specify by range?) in this file
" -> :execute getline(".")
"
" * how do you get a buffer being displayed in a particular
" window to be freed and have another buffer take its place?
"
" * how to determine whether certain commands already have
" default keybindings: :cn, :tabnew, etc.
"
" * how to choose keybindings for things that aren't already,
" random choice seems like it be a problem later
"
" * how to customize popup menu
"
" * how to determine what a given key sequence is bound to,
" if it is already used
"
" * how to select/copy/cut/paste column blocks
"
" * how to open current buffer/window in new tab
"
" still reading:
"
" * check out Help menu items
" * howto.txt
" * cmdline.txt
" * autocmd.txt
" * quickfix.txt
" * fold.txt
" * insert.txt - ft-javascript-omni
" * various.txt - :helpgrep
" *
http://vim.wikia.com...as_an_IDE_all_in_one" *
http://vim.wikia.com...wiki/Vim_on_Freenode" *
http://www.vi-improved.org/tutorial.php" * index.txt - z (Commands starting with 'z')
"
" ideas:
"
" * periodically analyze various histories (e.g. cmdline)
" and possibly make a menu of frequently used commands
"
" * look into ShowMarks:
" http://www.vim.org/scripts/script.php?script_id=152
"
" * look into CRefVim:
" http://www.vim.org/scripts/script.php?script_id=614
"
" * look into exUtility:
" http://www.vim.org/scripts/script.php?script_id=1729
"
" * look into CCTree:
" http://www.vim.org/scripts/script.php?script_id=2368
"
" nice tips:
"
" * :tab ba " for each buffer in buffer list open in tab
"
" * :tabm " make current tab the rightmost one
"
" * :sbn " split window and go to next buffer in list
"
" * q: " cmdline-window -- use C-c to get to cmdline
"
" * xp " transpose characters
"
" * "*yy " copy a line to clipboard
"
" * "*p " copy from clipboard to text
"
" * C-PgUp " previous tab
"
" * C-PgDn " next tab
"
" * :vimgrep /<pattern>/ ../**/* " recursively search for <pattern> in
" " files
"
" * C-t " indent
"
" * C-d " dedent
"
" * gq]/ " format comment (position cursor at start of comment first)
"
" already use a fair bit:
"
" * : " cmdline
"
" * / " search - use ? for search backwards
"
" * :s " substitute :[range]s/pattern/repl/[flags]
"
" * :bd " delete buffer
"
" * :bn " next buffer
"
" * :tabnew " new tab
"
" * :tabclose " close tab
"
" * :edit . " explorer current directory
"
" * :MRU " recent files buffer - via plugin
"
" * :WMToggle " windowmanager - via plugin + vimrc
"
" * :Tlist " taglist - via plugin
"
" * gf " edit file whose name is under or after cursor
"
" * u " undo
"
" * C-w c " close window
"
" * C-w o " make current window the sole window for current tab
"
" * C-w s " horizontally split current window
"
" * C-w v " vertically split current window
"
" XXX: not necessary when $HOME is set?
"let s:myhome = 'P:\home\GVimPortable\Data'
let s:myhome = $HOME
let s:mysettings = s:myhome . '\settings'
" no tabs please
set expandtab
" to get various things to work...
set nocp
filetype plugin on
" more command history
set history=500
" row and column in mode/status line
set ruler
" hilighting based on deduced structure of content
syntax enable
" searching options
set hls
set is
" don't want toolbar -- add 'T' to following string if reverting
" default was: set guioptions=egmrLtT
set guioptions=egmrLt
" recent-files plugin
let MRU_File = s:myhome . '\_vim_mru_files'
let MRU_Max_Entries = 40
" taglist plugin
" XXX: why doesn't the configuration file seem to work?
"let Tlist_Ctags_Cmd = 'P:\unix\bin\ctags.exe --options="' . s:myhome . '\ctags.cfg"'
"let Tlist_Ctags_Cmd = 'P:\unix\bin\ctags.exe -V --options=ctags.cfg'
let Tlist_Ctags_Cmd = 'P:\unix\bin\ctags.exe -V'
let Tlist_Show_Menu = 1
let tlist_javascript_settings =
\'javascript;f:function;c:class;m:method;v:variable;I:inner'
" winmanager plugin
map <c-w><c-t> :WMToggle<cr>
map <c-w><c-f> :FirstExplorerWindow<cr>
map <c-w><c-b> :BottomExplorerWindow<cr>
" XXX: default is:
"let winManagerWindowLayout = 'FileExplorer,TagsExplorer|BufExplorer'
let g:winManagerWindowLayout = 'FileExplorer,TagList|BufExplorer'
let g:winManagerWidth = 40
" minibufexplorer
" \mbe to start
" \mbc to close
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
" color scheme: black background
"colorscheme torte
"colorscheme koehler
"
http://www.cs.cmu.ed.../VimColorSchemeTest/" dante is from ColorSamplePack (plugin) others may be too
"colorscheme desert256
"colorscheme ChocolateLiquor
"colorscheme lilac
"colorscheme camo
"colorscheme desert
"colorscheme freya
"colorscheme neon
"colorscheme umber-green
"colorscheme *zenburn
"colorscheme *tabula
"colorscheme candycode
"colorscheme lettuce
"colorscheme darkslategray
"colorscheme darkblue
"colorscheme midnight
"colorscheme midnight2
"colorscheme navajo-night
colorscheme dante
" try this font
set guifont=Lucida_Console:h14:cANSI
" default viminfo was: '20,<50,s10,h,rA:,rB:
" just trying to get vim to save the viminfo file at some decent location
" XXX: may be there's a simpler way to do this
execute 'set viminfo+=' . 'n' . escape(s:myhome . '\_viminfo', '\')
" confirmation before various things
set confirm
" confirm before quitting
execute 'source ' . escape(s:mysettings . '\confirmQuit.vim', '\')
" get rid of variables?
unlet s:myhome
unlet s:mysettings