.inputrc to make bash command-line editing like ksh
set editing-mode vi set keymap vi
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
set editing-mode vi set keymap vi
set guifont=Monospace\ 11 " Overrides settings in vim's configuration. I prefer minimal colour. hi Normal guifg=Black guibg=White hi NonText guifg=Black guibg=White hi Comment gui=none guifg=DarkGray hi Constant gui=none guifg=Magenta hi Identifier gui=none guifg=DarkGreen hi Statement gui=none guifg=Blue hi PreProc gui=none guifg=Blue hi Type gui=none guifg=Blue hi Special gui=none guifg=DarkGreen hi Ignore gui=none guifg=DarkGreen hi Error gui=none guifg=DarkGreen hi Todo gui=none guifg=DarkGreen hi Cursor gui=none guifg=White guibg=Black autocmd GUIEnter * winpos 66 28 autocmd GUIEnter * winsize 80 45 " What is this menu for? No documentation, something to do with 'C' " or C++ perhaps? Dunno, but I don't want it. aunmenu Bicycle\ Repair\ Man " If I have Python, create a dummy project menu and exececute the " vimproject script. if has ("python") if filereadable ("/home/mrw/bin/vimproject.py") amenu Project.Dummy dummy pyfile /home/mrw/bin/vimproject.py endif endif
:autocmd! set nohlsearch " Press F2 to word-wrap a block of text. It's almost like using Word " Star all over again. map #2 !}fmt -65 " Personally, I wouldn't use a C++ keyword as a Java identifier, but " if someone else does, I don't want an ugly display, so turn off " flagging of this as an error: let java_allow_cpp_keywords=1 set autoindent set cmdheight=2 " Strewth, what a mess. Copied from the vim docs, if memory serves. set comments=s:/*,mb:**,ex:*/,://,b:#,b:##,:%,:XCOMM,n:>,fb:- set formatoptions=orc set history=20 set incsearch set ignorecase set keywordprg= set mouse=a set mousehide set mousemodel=popup_setpos set nowrapscan set path=.,/usr/include,/usr/local/include set smartcase set nosmartindent set smarttab set showmode set textwidth=70 set viminfo='50,\"10000,n~/.viminfo set wildchar=9 set wildignore+=*.class,*.pyc set wildmenu syntax on :autocmd FileType * set shiftwidth=4 :autocmd FileType xml,html set shiftwidth=2 :autocmd FileType java,c,cc,cpp set nocindent set makeprg=ant " Bleurgh! This makes sense of ant/jikes error messages so the ":make" " command works. But, I ask you, how the f**k can anyone make sense of " that mess? set efm=\ %#[javac]\ %#%f:%l:%c:%*\\d:%*\\d:\ %t%[%^:]%#:%m,\%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%# " For the style of comments I like in 'C', C++ and Java. autocmd BufNewFile,BufRead *.java set comments=s:/*,mb:**,ex:*/ autocmd BufNewFile,BufRead *.c set comments=s:/*,mb:**,ex:*/ autocmd BufNewFile,BufRead *.cc set comments=s:/*,mb:**,ex:*/