<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: vi code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 27 Jul 2008 03:10:24 GMT</pubDate>
    <description>DZone Snippets: vi code</description>
    <item>
      <title>.inputrc to make bash command-line editing like ksh</title>
      <link>http://snippets.dzone.com/posts/show/1990</link>
      <description>I was used to ksh and vi when bash came along, so I wanted the behaviour to remain the same. Some may think this odd.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set editing-mode vi&lt;br /&gt;set keymap vi&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 06 May 2006 02:26:24 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1990</guid>
      <author>mikewilsonuk (Mike Wilson)</author>
    </item>
    <item>
      <title>vim configuration - graphics mode</title>
      <link>http://snippets.dzone.com/posts/show/1987</link>
      <description>This is my .gvim rc, the configuration file for gvim, vim's graphics mode. vim is "vi improved", a vi clone and so much more.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set guifont=Monospace\ 11&lt;br /&gt;&lt;br /&gt;" Overrides settings in vim's configuration. I prefer minimal colour.&lt;br /&gt;&lt;br /&gt;hi Normal			guifg=Black		guibg=White&lt;br /&gt;hi NonText			guifg=Black		guibg=White&lt;br /&gt;hi Comment	gui=none	guifg=DarkGray&lt;br /&gt;hi Constant	gui=none	guifg=Magenta&lt;br /&gt;hi Identifier	gui=none	guifg=DarkGreen&lt;br /&gt;hi Statement	gui=none	guifg=Blue&lt;br /&gt;hi PreProc	gui=none	guifg=Blue&lt;br /&gt;hi Type		gui=none	guifg=Blue&lt;br /&gt;hi Special	gui=none	guifg=DarkGreen&lt;br /&gt;hi Ignore	gui=none	guifg=DarkGreen&lt;br /&gt;hi Error	gui=none	guifg=DarkGreen&lt;br /&gt;hi Todo		gui=none	guifg=DarkGreen&lt;br /&gt;hi Cursor	gui=none	guifg=White		guibg=Black&lt;br /&gt;&lt;br /&gt;autocmd GUIEnter * winpos 66 28&lt;br /&gt;autocmd GUIEnter * winsize 80 45&lt;br /&gt;&lt;br /&gt;" What is this menu for? No documentation, something to do with 'C'&lt;br /&gt;" or C++ perhaps? Dunno, but I don't want it.&lt;br /&gt;&lt;br /&gt;aunmenu Bicycle\ Repair\ Man&lt;br /&gt;&lt;br /&gt;" If I have Python, create a dummy project menu and exececute the&lt;br /&gt;" vimproject script.&lt;br /&gt;&lt;br /&gt;if has ("python")&lt;br /&gt;    if filereadable ("/home/mrw/bin/vimproject.py")&lt;br /&gt;	amenu Project.Dummy dummy&lt;br /&gt;	pyfile /home/mrw/bin/vimproject.py&lt;br /&gt;    endif&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 06 May 2006 02:13:27 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1987</guid>
      <author>mikewilsonuk (Mike Wilson)</author>
    </item>
    <item>
      <title>vim configuration</title>
      <link>http://snippets.dzone.com/posts/show/1986</link>
      <description>This is my .vimrc file -- configuration options for vim, the "vi improved" text editor for grown ups.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:autocmd!&lt;br /&gt;&lt;br /&gt;set nohlsearch&lt;br /&gt;&lt;br /&gt;" Press F2 to word-wrap a block of text. It's almost like using Word&lt;br /&gt;" Star all over again.&lt;br /&gt;&lt;br /&gt;map #2 !}fmt -65&lt;br /&gt;&lt;br /&gt;" Personally, I wouldn't use a C++ keyword as a Java identifier, but&lt;br /&gt;" if someone else does, I don't want an ugly display, so turn off&lt;br /&gt;" flagging of this as an error:&lt;br /&gt;&lt;br /&gt;let java_allow_cpp_keywords=1&lt;br /&gt;&lt;br /&gt;set autoindent&lt;br /&gt;set cmdheight=2&lt;br /&gt;&lt;br /&gt;" Strewth, what a mess. Copied from the vim docs, if memory serves.&lt;br /&gt;&lt;br /&gt;set comments=s:/*,mb:**,ex:*/,://,b:#,b:##,:%,:XCOMM,n:&gt;,fb:-&lt;br /&gt;&lt;br /&gt;set formatoptions=orc&lt;br /&gt;set history=20&lt;br /&gt;set incsearch&lt;br /&gt;set ignorecase&lt;br /&gt;set keywordprg=&lt;br /&gt;set mouse=a&lt;br /&gt;set mousehide&lt;br /&gt;set mousemodel=popup_setpos&lt;br /&gt;set nowrapscan&lt;br /&gt;set path=.,/usr/include,/usr/local/include&lt;br /&gt;set smartcase&lt;br /&gt;set nosmartindent&lt;br /&gt;set smarttab&lt;br /&gt;set showmode&lt;br /&gt;set textwidth=70&lt;br /&gt;set viminfo='50,\"10000,n~/.viminfo&lt;br /&gt;set wildchar=9&lt;br /&gt;set wildignore+=*.class,*.pyc&lt;br /&gt;set wildmenu&lt;br /&gt;&lt;br /&gt;syntax on&lt;br /&gt;&lt;br /&gt;:autocmd FileType *		set shiftwidth=4&lt;br /&gt;:autocmd FileType xml,html	set shiftwidth=2&lt;br /&gt;:autocmd FileType java,c,cc,cpp	set nocindent&lt;br /&gt;&lt;br /&gt;set makeprg=ant&lt;br /&gt;&lt;br /&gt;" Bleurgh! This makes sense of ant/jikes error messages so the ":make"&lt;br /&gt;" command works. But, I ask you, how the f**k can anyone make sense of&lt;br /&gt;" that mess?&lt;br /&gt;&lt;br /&gt;set efm=\ %#[javac]\ %#%f:%l:%c:%*\\d:%*\\d:\ %t%[%^:]%#:%m,\%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%#&lt;br /&gt;&lt;br /&gt;" For the style of comments I like in 'C', C++ and Java.&lt;br /&gt;&lt;br /&gt;autocmd BufNewFile,BufRead *.java set comments=s:/*,mb:**,ex:*/&lt;br /&gt;autocmd BufNewFile,BufRead *.c set comments=s:/*,mb:**,ex:*/&lt;br /&gt;autocmd BufNewFile,BufRead *.cc set comments=s:/*,mb:**,ex:*/&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 06 May 2006 02:10:06 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1986</guid>
      <author>mikewilsonuk (Mike Wilson)</author>
    </item>
  </channel>
</rss>
