<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>gvim &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/gvim/</link>
	<description>Feed of posts on WordPress.com tagged "gvim"</description>
	<pubDate>Fri, 27 Nov 2009 22:02:05 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Posteando desde g/VIM en Wordpress]]></title>
<link>http://miselaneos.wordpress.com/2009/11/22/posteando-desde-gvim-en-wordpress/</link>
<pubDate>Sun, 22 Nov 2009 19:17:02 +0000</pubDate>
<dc:creator>masterloki</dc:creator>
<guid>http://miselaneos.wordpress.com/2009/11/22/posteando-desde-gvim-en-wordpress/</guid>
<description><![CDATA[Después de un tiempo de usar Awesome WM y de probar KDE 4.3 he regresado a GNOME. Al parecer KDE ya ]]></description>
<content:encoded><![CDATA[Después de un tiempo de usar Awesome WM y de probar KDE 4.3 he regresado a GNOME. Al parecer KDE ya ]]></content:encoded>
</item>
<item>
<title><![CDATA[Quick find and edit using vi in Linux/UNIX]]></title>
<link>http://ranjithchandran.wordpress.com/2009/11/17/quick-find-and-edit-using-vi-in-linuxunix/</link>
<pubDate>Tue, 17 Nov 2009 16:04:39 +0000</pubDate>
<dc:creator>ranjithchandran</dc:creator>
<guid>http://ranjithchandran.wordpress.com/2009/11/17/quick-find-and-edit-using-vi-in-linuxunix/</guid>
<description><![CDATA[OK, so you want to edit/view all the files matching certain pattern on vi from command prompt. How w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>OK,  so you want to edit/view all the files matching certain pattern on vi from command prompt. How would you do it?<br />
Search files using usual &#8220;find&#8221; command, then translate new line in result to space using &#8220;tr&#8221; command and feed the list to vi &#8211; simple! Here you go:</p>
<pre class="brush: java;">vi `find . -name *.sh  &#124; tr '\n' ' '`</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Indentions and tabs in Windows vimrc]]></title>
<link>http://mmsmatt.wordpress.com/2009/11/08/indentions-and-tabs-in-windows-vimrc/</link>
<pubDate>Sun, 08 Nov 2009 18:56:10 +0000</pubDate>
<dc:creator>mmsmatt</dc:creator>
<guid>http://mmsmatt.wordpress.com/2009/11/08/indentions-and-tabs-in-windows-vimrc/</guid>
<description><![CDATA[My personal vimrc file on Windows (known as HOME\_virmrc). For gVim, it sets the font to Consolas. F]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>My personal vimrc file on Windows (known as HOME\_virmrc). For gVim, it sets the font to Consolas. For gVim and vim, it sets tabs to four spaces, and uses intelligent auto-indent behavior &#8211; the kind I expect from a fresh Fedora install of vim.</p>
<pre class="brush: plain;">
set guifont=Consolas:h10
winsize 120 40
set nobackup
set nowritebackup
set bs=2
syntax on

set tabstop=4
set shiftwidth=4
set expandtab

set cindent
set smartindent
set autoindent
set cinkeys=0{,0}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[gvim的使用]]></title>
<link>http://redrainl.wordpress.com/2009/11/03/gvim%e7%9a%84%e4%bd%bf%e7%94%a8/</link>
<pubDate>Tue, 03 Nov 2009 03:01:55 +0000</pubDate>
<dc:creator>redrainl</dc:creator>
<guid>http://redrainl.wordpress.com/2009/11/03/gvim%e7%9a%84%e4%bd%bf%e7%94%a8/</guid>
<description><![CDATA[http://blog.sina.com.cn/s/blog_46dac66f010002xz.html 善用Vim：实例系列(2)(2006-04-22 21:40:25) 分类：VIM/text ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>http://blog.sina.com.cn/s/blog_46dac66f010002xz.html</p>
<p>善用Vim：实例系列(2)(2006-04-22 21:40:25)</p>
<p> 	分类：VIM/text</p>
<p>[本文说明] 写过多篇Vim应用小文，为方便阅读，现做整理，并删除旧文。以后凡Vim文章，皆归入此系列。另，为便于搜索，统一vim、gvim及大小写为Vim。　&#8211;xbeta　2007年12月20日</p>
<p>[本文目录] 1 处理word目录 2 改变大小写 3 制作极点单字库</p>
<p>1 处理word目录</p>
<p>任务：</p>
<p>　　从word中把目录复制出来，去除多余信息(标题编号、页码)</p>
<p>命令：</p>
<p>　　%s/\d\&#124;\.\&#124;\s//gc</p>
<p>结果：</p>
<p>　　转瞬间200多行1000多字符烟消云灭</p>
<p>附图：</p>
<p>　　</p>
<p>2 改变大小写</p>
<p>刚才在BBS上回答了一个问题，当然，这个问题并不复杂。就是“如何把一个文本文件中的大写字母全部替换成小写”。http://www.newsmth.net/bbscon.php?board=NewSoftware&#38;id=840511</p>
<p>　　Word当然可以。</p>
<p>　　但作为文本，首先想到的还是gVIM，用它如何操作呢？</p>
<p>　　打开文件后，不用任何鼠标、菜单，只须在键盘上按下“ggguG”就行了。</p>
<p>　　极品软件就是这样：唯有功能强到极致，操作才能简到极致！</p>
<p>解释一下：ggguG分作三段gg gu G</p>
<p>gg=光标到文件第一个字符</p>
<p>gu=把选定范围全部小写</p>
<p>G=到文件结束</p>
<p>3 制作极点单字库</p>
<p>用五笔，我习惯输入单字。为此，就要把词库中的多字词去除。</p>
<p>（之所以不设定为单字模式，因为定义了一些其他词，如bis=http://blog.sina.com.cn/m/xbeta等）</p>
<p>极点有一个这样的工具，但我用的不熟。</p>
<p>想到了强大的VIM文本编辑器，一试，果然成功，并且简便。</p>
<p>与大家分享如下。(如果试验请谨慎，先做好备份。本文作者不对后果承担任何责任)</p>
<p>并感谢杜老师在极点5.0中更正了极点设置后VIM会崩溃的问题。</p>
<p>极点词库格式很简单，编码1-4字母，几个词，用空格分开。例如下:</p>
<p>　　｜aaff 蓬蓬勃勃 苷</p>
<p>　　｜aafg 葡萄干</p>
<p>　　｜aafh 苏东坡</p>
<p>　　｜aafn 工场</p>
<p>　　｜aafo 蘜</p>
<p>要去除多于1字的词语，只要2行命令就OK。</p>
<p>用VIM打开词库文件。</p>
<p>执行命令</p>
<p>　　:.,$s/ \S\{2,}\( \&#124;$\)/ /gc</p>
<p>和</p>
<p>　　:.,$g/^\a\{1,4} $/normal dd</p>
<p>保存，就完了。</p>
<p>只要2行命令，而每条命令又如此古怪，大家可以想见VIM之功能强大。</p>
<p>　　VI是UNIX下文本编辑器的鼻祖。也就是说，基于它有很多改进的分支。</p>
<p>　　而VIM则是其中影响力最大的一支。它的第一个版本出现于1976年(哪个软件还有如此长的历史而依然活跃)。</p>
<p>　　我以前知道并用过盗版的Ultraedit、Editplus、Emeditor，认识VIM后将它们全舍弃了。</p>
<p>　　你能设想VIM是免费开源的吗？</p>
<p>　　VIM在windows平台下的版本是gVIM，我用的就是它。</p>
<p>　　安装后(包括多国语言文件、插件、语法文件)占空间20M。其实，最少只要一个exe文件不到2M就可以用了。</p>
<p>　　有兴趣的可以到华军下载一个。再到网上找找教程，或到水木社区smth.org的VIM版。</p>
<p>:.,$s/ \S\{2,}\( \&#124;$\)/ /gc</p>
<p>解释如下：</p>
<p>　　:表示外部命令</p>
<p>　　.,$表示当前行到全文结束</p>
<p>　　s表示替换</p>
<p>共有三个/</p>
<p>　　前两个//之间是要被替换的旧字符串(正则表达式)。“ \S\{1,}\( \&#124;$\)”表示“先有一个空格，再有1-N个非空字符，然后是一个空格或行尾”。</p>
<p>　　后两个//之间是要替换为的新字符串，本例中，为一个空格。</p>
<p>　　gc表示替换所有匹配的情况，并且每次要用户手工确认(这是为了直观和谨慎，如果有把握，可以不确认，直接执行)。</p>
<p>:.,$g/^\a\{1,4} $/normal dd</p>
<p>解释如下：</p>
<p>　　:表示外部命令</p>
<p>　　g表示找到某个字符串，然后执行某个操作</p>
<p>　　第一个/之后是要找的字符串，“^\a\{2,4} $”表示找“行首，然后是2-4个英文字母，然后空格，然后行尾”</p>
<p>　　第二个/之后是要执行的命令，“normal dd”，在VIM中是删除本行。</p>
<p>（本篇完）</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Customizing vim]]></title>
<link>http://anonir.wordpress.com/2009/10/26/customizing-vim/</link>
<pubDate>Mon, 26 Oct 2009 18:04:18 +0000</pubDate>
<dc:creator>anonir</dc:creator>
<guid>http://anonir.wordpress.com/2009/10/26/customizing-vim/</guid>
<description><![CDATA[You can set additional options in vim to make your programming life easier. You can add these option]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>You can set additional options in vim to make your programming life easier. You can add these options to .vimrc in your home folder so that they are loaded every time you start vim.</p>
<pre>
vim ~/.vimrc

set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
syntax on
colo murphy
</pre>
<p></p>
<p>To know what each option does,  just type:</p>
<pre>:help &#60;option&#62;</pre>
<p></p>
<p>For example to know about autoindent, type:</p>
<pre>:help autoindent</pre>
<p></p>
<h2>gvim</h2>
<p>By default, gvim uses courier font. To set your own font, create a file .gvimrc in your home and add set guifont option:</p>
<pre>
vim ~/.gvimrc

set guifont=Bitstream\ Vera\ Sans\ Mono\ 9
</pre>
<p></p>
<p>Another useful option is to set the window size:</p>
<pre>set lines=100 columns=130</pre>
<p></p>
<p>Note that gvim reads options from .vimrc as well. But vim will not read options from .gvimrc</p>
<h2>Other resources of interest</h2>
<ul>
<li><a href="http://clipboarded.blogspot.com/2007/10/vim-as-ide.html">vim as an IDE</a></li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=614">CRefVim : a C-reference manual especially designed for Vim </a></li>
<li><a href="http://vim.sourceforge.net/scripts/script.php?script_id=213">c.vim : C/C++ IDE &#8212;  Write and run programs. Insert statements, idioms, comments etc. </a></li>
<li><a href="http://ctags.sourceforge.net/">Exuberant ctags</a> (sudo apt-get install exuberant-ctags)</li>
<li><a href="http://vim-taglist.sourceforge.net/installation.html">Taglist plugin</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Din IT]]></title>
<link>http://cultivatinro.wordpress.com/2009/10/21/din-it-2/</link>
<pubDate>Wed, 21 Oct 2009 05:16:22 +0000</pubDate>
<dc:creator>Augustin Preda</dc:creator>
<guid>http://cultivatinro.wordpress.com/2009/10/21/din-it-2/</guid>
<description><![CDATA[M-am uitat peste gVim, după ce l-am văzut ca aplicaţie portabilă. Cât am fost în facultate, am folos]]></description>
<content:encoded><![CDATA[M-am uitat peste gVim, după ce l-am văzut ca aplicaţie portabilă. Cât am fost în facultate, am folos]]></content:encoded>
</item>
<item>
<title><![CDATA[gvimrc файл конфигурации под IDE для PHP]]></title>
<link>http://xezzus.wordpress.com/2009/10/13/gvimrc-%d1%84%d0%b0%d0%b9%d0%bb-%d0%ba%d0%be%d0%bd%d1%84%d0%b8%d0%b3%d1%83%d1%80%d0%b0%d1%86%d0%b8%d0%b8/</link>
<pubDate>Tue, 13 Oct 2009 08:23:06 +0000</pubDate>
<dc:creator>xezzus</dc:creator>
<guid>http://xezzus.wordpress.com/2009/10/13/gvimrc-%d1%84%d0%b0%d0%b9%d0%bb-%d0%ba%d0%be%d0%bd%d1%84%d0%b8%d0%b3%d1%83%d1%80%d0%b0%d1%86%d0%b8%d0%b8/</guid>
<description><![CDATA[Установить плагин taglist для выпадающего списка функций по Ctrl + пробел " Цветовая схема color des]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Установить плагин taglist для выпадающего списка функций по Ctrl + пробел<br />
<code>" Цветовая схема<br />
color desert<br />
" Убрать правый тулбар<br />
set guioptions-=r<br />
" Подсветка синтаксиса<br />
filetype on<br />
filetype plugin on<br />
syntax on<br />
" Нумерация строк<br />
set nu<br />
" размеры окна<br />
set lines=30<br />
set columns=135<br />
" Отключить создание файлов бекапа и свапа<br />
set nobackup<br />
set nowritebackup<br />
set noswapfile<br />
" Список используемых кодировок для автоматического их определения<br />
set fileencodings=utf-8,koi8-r,cp1251,cp866<br />
" Меню выбора кодировки текста (utf8, cp1251, koi8-r, cp866)<br />
menu Кодировка.utf-8 :e ++enc=utf8 &#60;CR&#62;<br />
menu Кодировка.windows-1251 :e ++enc=cp1251&#60;CR&#62;<br />
menu Кодировка.koi8-r :e ++enc=koi8-r&#60;CR&#62;<br />
menu Кодировка.cp866 :e ++enc=cp866&#60;CR&#62;<br />
" Недаразумение<br />
set iskeyword=@,a-z,A-Z,48-57,_,128-175,192-255<br />
" Размер отступов<br />
set shiftwidth=2<br />
" Размеры табуляций<br />
set tabstop=2<br />
set softtabstop=2<br />
" Преобразование Таба в пробелы<br />
set expandtab<br />
" Скрыть панель в gui версии ибо она не нужна<br />
set guioptions-=T<br />
" Сделать строку команд высотой в одну строку<br />
set ch=1<br />
" Включить автоотступы<br />
set autoindent<br />
" Не сворачивать длинные строки<br />
set nowrap<br />
" ------------------------------ "<br />
"              PHP               "<br />
" ------------------------------ "<br />
" Включить фолдинг для блогов классов/функций<br />
let php_folding=0<br />
" Подсветка SQL<br />
let php_sql_query=1<br />
" Подстветка HTML<br />
let php_htmlInStrings=1<br />
" Подстветка базовых функций PHP<br />
let php_baselib=1<br />
" ------------------------------ "<br />
"       Сочетания клавиш         "<br />
" ------------------------------ "<br />
" C-D - удаление текущей строки<br />
nmap &#60;C-D&#62; dd<br />
imap &#60;C-D&#62; &#60;esc&#62;dda<br />
vmap &#60;C-D&#62; &#60;esc&#62;dda<br />
" Окрыть новую вкладку<br />
imap &#60;C-T&#62; &#60;esc&#62;:tabnew&#60;cr&#62;<br />
vmap &#60;C-пробел для автодополнения<br />
inoremap &#60;C-space&#62; &#60;C-x&#62;&#60;C-o&#62;<br />
"Ctrl-w - удаление текущего буфера<br />
nmap &#60;C-w&#62; :bd&#60;cr&#62;<br />
imap &#60;C-w&#62; &#60;esc&#62;:bd&#60;cr&#62;<br />
" Сохранить файл<br />
nmap &#60;C-S&#62; :w&#60;cr&#62;<br />
imap &#60;C-S&#62; &#60;esc&#62;:w&#60;cr&#62;a<br />
vmap &#60;C-S&#62; &#60;esc&#62;:w&#60;cr&#62;a<br />
" Копировать<br />
vmap &#60;C-C&#62; "+ya<br />
" Вклеить<br />
imap &#60;C-V&#62; &#60;esc&#62;"+gpa<br />
" Вырезать<br />
vmap &#60;C-X&#62; "+xa<br />
" Отменить<br />
imap &#60;C-Z&#62; &#60;esc&#62;ua<br />
" Вернуть<br />
imap &#60;C-Y&#62; &#60;esc&#62;&#60;C-R&#62;<br />
" Выделить все<br />
nmap &#60;C-A&#62; ggVG<br />
imap &#60;C-A&#62; &#60;esc&#62;ggVG<br />
vmap &#60;C-A&#62; &#60;esc&#62;ggVG<br />
" F11 - показать окно Taglist<br />
map &#60;F11&#62; :TlistToggle&#60;cr&#62;<br />
vmap &#60;F11&#62; &#60;esc&#62;:TlistToggle&#60;cr&#62;<br />
imap &#60;F11&#62; &#60;esc&#62;:TlistToggle&#60;cr&#62;<br />
" F12 - обозреватель файлов<br />
map &#60;F12&#62; :Ex&#60;cr&#62;<br />
vmap &#60;F12&#62; &#60;esc&#62;:Ex&#60;cr&#62;i<br />
imap &#60;F12&#62; &#60;esc&#62;:Ex&#60;cr&#62;i<br />
" Открыть пустую вкладку<br />
nmap &#60;C-T&#62; :tabnew&#60;cr&#62;<br />
imap &#60;C-T&#62; &#60;esc&#62;:tabnew&#60;cr&#62;<br />
vmap &#60;C-T&#62; &#60;esc&#62;:tabnew&#60;cr&#62;<br />
" Такая фича, чтобы при нажатии на шифт можно было выделять блок стрелочками<br />
" ну или другми клавишами типа h/j/k/l<br />
" не решено<br />
"<br />
"if version &#62;= 700<br />
"   По умолчанию проверка орфографии выключена.<br />
"    setlocal spell spelllang=</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Usando Vim no Windows]]></title>
<link>http://truecode.wordpress.com/2009/10/03/usando-vim-no-windows/</link>
<pubDate>Sat, 03 Oct 2009 15:18:23 +0000</pubDate>
<dc:creator>ceb10n</dc:creator>
<guid>http://truecode.wordpress.com/2009/10/03/usando-vim-no-windows/</guid>
<description><![CDATA[Como continuo sem tempo em colocar algumas coisas aqui (principalmente de estar estudando bastante p]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Como continuo sem tempo em colocar algumas coisas aqui (principalmente de estar estudando bastante para o projeto da faculdade &#8211; JPacman), eu estou apenas postando curiosidades, dicas, etc. Resolvi fazer este post, pois é uma dica muito boa, principalmente para quem não é apegado a grandes IDE&#8217;s e seus pesados e &#8220;poderosos&#8221; recursos. Estou falando do Vim, o melhor editor de texto já feito. É muito comum utilizar o vi ou o vim quando se está em ambiente unix-based, porém o que muita gente não sabe, é que é possível utilizar o vim no Windows. Não há muito o que explicar, basta entrar nesse <a href="http://www.vim.org/download.php">link</a> e realizar o download para win32.</p>
<p><img src="http://charupload.files.wordpress.com/2008/04/gvim.png" alt="vim" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Disseram-me IDE! Então eu VIM]]></title>
<link>http://henriquegogo.wordpress.com/2009/08/31/disseram-me-ide-entao-eu-vim/</link>
<pubDate>Mon, 31 Aug 2009 17:32:22 +0000</pubDate>
<dc:creator>Henrique Gogó</dc:creator>
<guid>http://henriquegogo.wordpress.com/2009/08/31/disseram-me-ide-entao-eu-vim/</guid>
<description><![CDATA[Existem muitos artigos e flamewars (principalmente entre vim x emacs) sobre &#8220;a melhor IDE para]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Existem muitos artigos e flamewars (principalmente entre vim x emacs) sobre &#8220;a melhor IDE para se desenvolver qualquer coisa&#8221;. Não vou dizer qual a melhor, até mesmo porque a melhor é a que você gostar mais, mas nesse artigo vou tratar de um programa bem rico e customizável: o VIM.</p>
<p>De início, utilizar o vim parece um &#8220;parto&#8221;. Tudo é comando, as teclas de atalho mais conhecidas não funcionam, aquela interface simples chega a dar repulsa. Felizmente, isso passa. Nada do que um bom :help para aprender a mexer mo bichinho. Seguir o tutorial padrão do sistema é uma ótima ideia para se aprender o básico, e, daí, aproveitar o máximo que esse editor de textos pode proporcionar.</p>
<p>Uma das características principais do vim é sua customização. Praticamente tudo é customizável, e até programável. A possibilidade de fazer plugins e outras coisas mais como &#8220;syntax highlight&#8221; vão incrementando sua área de edição a ponto de deixar da maneira que você quiser.</p>
<p>Já utilizo o vim há um tempo, inicialmente para montar HTML + CSS e atualmente para programar em Rails. Praticamente abandonei o Eclipse e o Aptana para utilizar somente o vim. Para chegar a tal ponto de &#8220;migrar&#8221; de IDE, tive que passar por um relativo processo de customização do editor para que ele ficasse &#8220;no ponto&#8221;. Existe um arquivo chamado &#8220;.vimrc&#8221; na pasta raiz da aplicação. É lá que você vai aplicar as alterações propostas nesse artigo.</p>
<p>O arquivo que disponibilizo é uma versão customizada do vim criada por mim, e está todo comentado.</p>
<p>Inicialmente, recomendo a instalação dos seguintes plugins:</p>
<ul>
<li><a href="http://www.vim.org/scripts/script.php?script_id=1658" target="_blank">NERDTree</a> :: Lista os arquivos em árvore</li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=927" target="_blank">colorsel</a> :: Seleciona uma cor hexadecimal</li>
<li><a href="http://www.vim.org/scripts/script.php?script_id=2591" target="_blank">html_autoclosetag</a> :: Fecha as tags HTML com seu &#8220;par&#8221;</li>
<li><a href="http://blog.infinitered.com/entry_files/8/ir_black.vim" target="_blank">ir_black</a> :: Color scheme elegante e organizado</li>
</ul>
<p>Depois, instale um corretor ortográfico da língua portuguesa. Para isso você precisará ter a versão 7 ou superior do vim.</p>
<ul>
<li>Faça o <a href="http://www.broffice.org/verortografico/baixar" target="_blank">download do dicionário</a></li>
<li>Descompacte o arquivo</li>
<li>No vim, digite o comando &#8216;:mkspell pt /caminho/do/descompactamento/pt_BR&#8217;</li>
<li>Copie o arquivo gerado para a pasta ~/.vim/spell/</li>
<li>Ative a correção: &#8216;:set spell&#8217;</li>
<li>Escolha o dicionário: &#8216;:set spelllang=pt&#8217;</li>
</ul>
<p>Pronto, esses são os plugins que eu recomendo para a utilização do vim e transformá-lo numa verdadeira IDE, mas não basta só isso. Vamos agora para o principal: o arquivo de configuração .vimrc. Eu configurei um arquivo que pode ser utilizado tanto no vim para windows como na versão linux. Peguei um apanhado de configurações da internet e personalizei ao meu gosto. Acredito que provavelmente seja do gosto da maioria.</p>
<p>Se você utiliza o vim no Windows, adicione seguinte linha no início do arquivo:</p>
<p><code>source $VIMRUNTIME/vimrc_example.vim</code></p>
<p>Abaixo, o arquivo comentado e explicado.</p>
<pre style="font-size:10px;">"""""""""""""""""""""""""""""""""""
" CONFIGURAÇÕES PADRONIZADAS GOGS "
"""""""""""""""""""""""""""""""""""

set number                  " Numera as linhas
set nobackup                " Não salva arquivos de backup~
set wildmode=longest,list   " Completa o comando com TAB igual o bash

set ignorecase              " Ignora o case sensitive nas buscas
set smartcase               " Se tiver alguma letra maiúscula, ativa o case sensitive

filetype plugin indent on   " Detecta o tipo de arquivo e já aplica a indentação
set smartindent             " Auto-indenta
"set expandtab               " Identa com espaços

set tabstop=2               " Quantidade de espaços por identação
set shiftwidth=2            " Quantidade de espaços da auto-indentação

colorscheme ir_black        " Escolhe o tema

" Corretor ortográfico
set spelllang=pt            " Escolhe o dicionário

" Atalhos para plugins
map &#60;F5&#62; :NERDTree&#60;CR&#62;
map &#60;F6&#62; :ColorSel&#60;CR&#62;
map &#60;F7&#62; :set spell&#60;CR&#62;

" Cria e escolhe as abas
map &#60;C-t&#62; :tabnew&#60;CR&#62;
map &#60;C-TAB&#62; :tabnext&#60;CR&#62;
map &#60;C-S-TAB&#62; :tabprevious&#60;CR&#62;

" Mover texto com os TABs
vnoremap &#60; &#60;gv
vnoremap &#62; &#62;gv
map &#60;TAB&#62; &#62;
map &#60;S-TAB&#62; &#60;

" Auto-fecha parênteses, chaves etc.
inoremap { {}&#60;LEFT&#62;
inoremap ( ()&#60;LEFT&#62;
inoremap [ []&#60;LEFT&#62;
inoremap " ""&#60;LEFT&#62;
inoremap ' ''&#60;LEFT&#62;

" Auto-completa segundo a sintaxe, caso não haja dicionário omnicomplete
setlocal omnifunc=syntaxcomplete#Complete

" Função que usa o omnicomplete apenas com o TAB
function! CleverTab()
 if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
 return "\&#60;Tab&#62;"
 elseif exists('&#38;omnifunc') &#38;&#38; &#38;omnifunc != ''
 return "\&#60;C-X&#62;\&#60;C-O&#62;"
 else
 return "\&#60;Tab&#62;"
 endif
endfunction
inoremap &#60;Tab&#62; &#60;C-R&#62;=CleverTab()&#60;CR&#62;

""""""""""""""""""""""""
" Menus personalizados "
""""""""""""""""""""""""

" SVN
menu SVN.Status   :!svn status&#60;CR&#62;
menu SVN.-SEP1-   :&#60;Nop&#62;
menu SVN.Update   :!svn update&#60;CR&#62;
menu SVN.Commit   :!svn commit -m=" "&#60;CR&#62;
menu SVN.-SEP2-   :&#60;Nop&#62;
menu SVN.Ajuda    :!svn help&#60;CR&#62;

"""""""""""""""""""""""""""""
" Atalhos de teclado comuns "
"""""""""""""""""""""""""""""

" Permite selecionar com SHIFT + SETA como no Windows
set selectmode=mouse,key
set mousemodel=popup
set keymodel=startsel,stopsel
set selection=exclusive

" Backspace no modo de visão apaga a seleção
vnoremap &#60;BS&#62; d

" CTRL-X e SHIFT-Del corta
vnoremap &#60;C-X&#62; "+x
vnoremap &#60;S-Del&#62; "+x

" CTRL-C e CTRL-Insert copia
vnoremap &#60;C-C&#62; "+y
vnoremap &#60;C-Insert&#62; "+y

" CTRL-V e SHIFT-Insert cola
map &#60;C-V&#62;             "+gP
map &#60;S-Insert&#62;        "+gP
imap &#60;C-V&#62;            &#60;C-R&#62;+
imap &#60;S-Insert&#62;       &#60;C-R&#62;+
cmap &#60;C-V&#62;            &#60;C-R&#62;+
cmap &#60;S-Insert&#62;       &#60;C-R&#62;+

" CTRL-S salva
noremap &#60;C-S&#62;        :update&#60;CR&#62;
vnoremap &#60;C-S&#62;       &#60;C-C&#62;:update&#60;CR&#62;
inoremap &#60;C-S&#62;       &#60;C-O&#62;:update&#60;CR&#62;

" CTRL-Z desfaz
noremap &#60;C-Z&#62; u
inoremap &#60;C-Z&#62; &#60;C-O&#62;u

" CTRL-Y refaz
noremap &#60;C-Y&#62; &#60;C-R&#62;
inoremap &#60;C-Y&#62; &#60;C-O&#62;&#60;C-R&#62;

" CTRL-A seleciona tudo
noremap &#60;C-A&#62; gggH&#60;C-O&#62;G
inoremap &#60;C-A&#62; &#60;C-O&#62;gg&#60;C-O&#62;gH&#60;C-O&#62;G
cnoremap &#60;C-A&#62; &#60;C-C&#62;gggH&#60;C-O&#62;G
onoremap &#60;C-A&#62; &#60;C-C&#62;gggH&#60;C-O&#62;G
snoremap &#60;C-A&#62; &#60;C-C&#62;gggH&#60;C-O&#62;G
xnoremap &#60;C-A&#62; &#60;C-C&#62;ggVG

" CTRL-F4 fecha a janela
noremap &#60;C-F4&#62; &#60;C-W&#62;c
inoremap &#60;C-F4&#62; &#60;C-O&#62;&#60;C-W&#62;c
cnoremap &#60;C-F4&#62; &#60;C-C&#62;&#60;C-W&#62;c
onoremap &#60;C-F4&#62; &#60;C-C&#62;&#60;C-W&#62;c

" Plugins recomendados:
" - NERDTree :: Lista os arquivos em árvore
" - colorsel :: Seleciona uma cor hexadecimal
" - ir_black :: Color scheme bem bonito
" Para utilizar o SVN, basta usar o comando que executa comandos externos,
" como por exemplo: ':!svn up'

" Corretor ortográfico em português brasileiro:
" - Faça o download do dicionário em: http://www.broffice.org/verortografico/baixar
" - Descompacte o arquivo
" - No vim, digite o comando ':mkspell pt pt_BR'
" - Copie o arquivo gerado para a pasta ~/.vim/spell/
" - Ative a correção: ':set spell'
" - Escolha o dicionário: ':set spelllang=pt'</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Get Started With Vim]]></title>
<link>http://geekylinuxblog.wordpress.com/2009/08/17/get-started-with-vim/</link>
<pubDate>Mon, 17 Aug 2009 16:28:18 +0000</pubDate>
<dc:creator>Dave</dc:creator>
<guid>http://geekylinuxblog.wordpress.com/2009/08/17/get-started-with-vim/</guid>
<description><![CDATA[Vim is my favorite text editor (sorry Emacs guys). Anything that I write on my computer gets written]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Vim is my favorite text editor (sorry Emacs guys). Anything that I write on my computer gets written in Vim. I used to be a word processor fan until they started to annoy me with spell-check. While I love how word processors can fix my spelling mistakes, I want them to do it after I write. I absolutely hate how they underline every misspelling. Writing and editing are two separate processes and writing always goes first. That&#8217;s why I started to blog using Vim.</p>
<p>There are a lot of great things about Vim, but before you dive in, know that it takes some adjusting if you&#8217;ve never used a command-line text editor. You don&#8217;t get your open and save buttons like you do in most applications. Everything you do in Vim is done with the keyboard, which in turn means that you need to learn some commands, and some of them are a little odd to say the least. How about we start with the basics though, shall we?</p>
<p>If you haven&#8217;t brought up a terminal window yet, do so. Ready? Okay, here we go. Type <code>vim</code> and press Enter. You should be greeted by a nice welcome screen or you&#8217;ll be met with an error saying that it doesn&#8217;t exist. If you received the latter and you&#8217;re on Ubuntu, type <code>sudo apt-get install vim</code> and you should be good to go.</p>
<p>Once you reach that nice intro screen, you&#8217;ll probably realize that you can&#8217;t type anything. This is because you have to press &#8216;i&#8217; to enter insert mode. Write a little bit, just to test it out. When you have some text down, press the &#8216;Esc&#8217; key. This exits insert mode. Now I can show you some of Vim&#8217;s commands.</p>
<p>The commands you are going to use the most are <code>:w</code>, <code>:q!</code>, and <code>ZZ</code>. The <code>:w</code> command tells Vim to <em>write</em> the buffer out to a file (in simple terms, it saves your work), while <code>:q</code> tells Vim that you want to quit. Try typing something without saving and exit using <code>:q</code>. It won&#8217;t let you will it? You see, if you modify a buffer without writing that buffer to a file, Vim won&#8217;t let you quit. That&#8217;s why you should use <code>:q!</code> instead. It overrides that default behavior, letting you quit without saving. You can combine the save and quit commands with <code>ZZ</code>.</p>
<p>Those commands are all you need to know to start using Vim, but there are tons more. One easy way to learn them all (or to avoid using them) is to use GVim. GVim is Vim with a graphical interface. It teaches you by showing the keyboard commands next to the actions in the menu. For example, it will say &#8216;Paste&#8217; in the menu, but to the right of it you&#8217;ll see <code>"+gP</code>. This makes GVim a great app if you&#8217;re just getting started.</p>
<p>The true power of Vim lies in it&#8217;s simplicity. It separates the two parts of the writing process (writing and editing), by forcing you to do only one at a time. It also helps you concentrate on your work. No distractions, no notifications, just a clean environment where you put your thoughts into words.</p>
<p>Vim can be used by programmers as well. It supports syntax highlighting for a variety of languages and has many features just for developers. In fact, Vim is meant more for programming than writing, but it does both equally well.</p>
<p>For more information about Vim, go over to <a title="Vim" href="http://www.vim.org/">www.vim.org</a> where you can read some documentation and download Vim for other platforms. I also highly recommend downloading GVim (it&#8217;s at the Vim website). It helps during the learning process and will get you up and running in no time.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[vim 7 spell check]]></title>
<link>http://ranjithchandran.wordpress.com/2009/07/29/vim-7-spell-check/</link>
<pubDate>Wed, 29 Jul 2009 05:39:06 +0000</pubDate>
<dc:creator>ranjithchandran</dc:creator>
<guid>http://ranjithchandran.wordpress.com/2009/07/29/vim-7-spell-check/</guid>
<description><![CDATA[vim as of version 7 had introduced built-in spellchecker. I had not used till date, but recently che]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.vim.org">vim </a>as of version 7 had introduced built-in spellchecker. I had not used till date, but recently checked it out. So, to turn it on, type command<br />
<code>set spell</code><br />
If you have some text on your vim and you turn sell on with above command, you will see red underlines for words that vim thinks are incorrectly spelled. Of course, while coding you might not want spell check, so you can turn it off by<br />
<code>set nospell</code><br />
Now, about navigation and correction.<br />
To go to next spelling error, the keyboard command is <code>]s</code> to go to previous error, the command is <code>[s</code>. To see spelling suggestions, while the cursor is on word with error, press <code>=z</code> and it presents a list of possible words to choose from. Just type the number corresponding to the word that you are interested in, and you are all set.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Great Link: Handling ^M]]></title>
<link>http://linuxsagas.wordpress.com/2009/07/09/great-link-handling-m/</link>
<pubDate>Thu, 09 Jul 2009 10:38:20 +0000</pubDate>
<dc:creator>digitaleagle</dc:creator>
<guid>http://linuxsagas.wordpress.com/2009/07/09/great-link-handling-m/</guid>
<description><![CDATA[When working in a mixed environment, you are bound to run into those ^M characters at the end of you]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>When working in a mixed environment, you are bound to run into those ^M characters at the end of your lines at some point.  Here is a great link describing how to fix it.  They talk about vi, but gVim works the same way.</p>
<p><a href="http://knoworacle.wordpress.com/2009/05/13/removing-m-from-sqlloader-datafile/" target="_blank">Oracle Applications – Business &#38; Technology: Removing ”^M” from SQL*Loader datafile</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Text Editor on Ubuntu?]]></title>
<link>http://kemsiro.wordpress.com/2009/07/07/text-editor-on-ubuntu/</link>
<pubDate>Tue, 07 Jul 2009 02:04:06 +0000</pubDate>
<dc:creator>kemsiro</dc:creator>
<guid>http://kemsiro.wordpress.com/2009/07/07/text-editor-on-ubuntu/</guid>
<description><![CDATA[I&#8217;ve been trying so many text editors for Ubuntu and i ended up using gvim + cream. To install]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve been trying so many text editors for Ubuntu and i ended up using gvim + cream.</p>
<p>To install gvim:<strong> sudo aptitude install gvim </strong>( Or you can use GUI Add/Remove Applications and search for gvim )</p>
<p>To install cream, download the .deb file from its <a href="http://cream.sourceforge.net/" target="_blank">homepage</a></p>
<p><strong>Cream screenshot</strong><br />
<img class="aligncenter" src="http://h.imagehost.org/0542/cream.png" alt="Cream" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[GVIM and clipboard]]></title>
<link>http://abhirama.wordpress.com/2009/06/15/gvim-and-clipboard/</link>
<pubDate>Mon, 15 Jun 2009 10:58:47 +0000</pubDate>
<dc:creator>abhirama</dc:creator>
<guid>http://abhirama.wordpress.com/2009/06/15/gvim-and-clipboard/</guid>
<description><![CDATA[I love GVIM as an editor but my only gripe with it was, I was not able to figure out how to copy to ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I love GVIM as an editor but my only gripe with it was, I was not able to figure out how to copy to clipboard and how to paste from clipboard. Finally after lots of poking around I did figure it out.</p>
<p>Copying from clipboard:<br />
In insert mode press  &#60;shift&#62; + &#60;insert&#62; </p>
<p>Copying to clipboard:<br />
Once you visually select the content to copy, press *y</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[vi/Vim 30 days &ndash; Day 5]]></title>
<link>http://sebastienlachance.wordpress.com/2009/05/27/vivim-30-days-day-5/</link>
<pubDate>Wed, 27 May 2009 17:56:46 +0000</pubDate>
<dc:creator>Sebastien Lachance</dc:creator>
<guid>http://sebastienlachance.wordpress.com/2009/05/27/vivim-30-days-day-5/</guid>
<description><![CDATA[I’m starting to really like this. I’m much more confident and often I don’t need to think twice befo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I’m starting to really like this. I’m much more confident and often I don’t need to think twice before using a command. Today I have used many times the “yank &#38; put” keys along with v,V (selection)&#160; and o,O (new line before of after the current line). I am not required to think. So far, so good.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim 30 days &ndash; Day 4]]></title>
<link>http://sebastienlachance.wordpress.com/2009/05/25/vim-30-days-day-4/</link>
<pubDate>Mon, 25 May 2009 20:11:04 +0000</pubDate>
<dc:creator>Sebastien Lachance</dc:creator>
<guid>http://sebastienlachance.wordpress.com/2009/05/25/vim-30-days-day-4/</guid>
<description><![CDATA[Today I had real opportunity to use gVim so I decided to install ViEmu for Visual Studio and give it]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today I had real opportunity to use gVim so I decided to install <a href="http://www.viemu.com/">ViEmu for Visual Studio</a> and give it a try. A had a lot of code to write on a recent application I&#8217;m working on so why not. </p>
<p>I&#8217;m starting to get a hand on basic navigation and on inserting/appending removing/deleting characters. It&#8217;s too soon to know I it had improved my productivity yet, but I&#8217;m still learning so let&#8217;s see in a couple of days how it goes.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vi/Vim 30 days &ndash; Day 3]]></title>
<link>http://sebastienlachance.wordpress.com/2009/05/22/vivim-30-days-day-3/</link>
<pubDate>Fri, 22 May 2009 16:53:17 +0000</pubDate>
<dc:creator>Sebastien Lachance</dc:creator>
<guid>http://sebastienlachance.wordpress.com/2009/05/22/vivim-30-days-day-3/</guid>
<description><![CDATA[Not been typing much today, but I wanted at least to clear something. How do I cut/paste inside gVim]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Not been typing much today, but I wanted at least to clear something. How do I cut/paste <strong>inside</strong> gVim. </p>
<p>First you need to enter the selection mode by hitting &#34;v&#34;. Then move the cursor to select text using h, j, k, l, w, e, etc. When the text is selected, hit &#34;d&#34;. This will cut the text. Now hit &#34;p&#34; to put the line back. </p>
<p>On another note, I talked about vi/vim to some of my colleagues and friends and everyone is just laughing at me. Everyone seems to agree that there is no points in learning this and should stick with &#34;what everyone do&#34;. I do hope to show them what it&#8217;s really about.&#160;&#160; </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaScriptLint, Vim, And Ubuntu]]></title>
<link>http://ioconnor.wordpress.com/2009/05/02/javascriptlint-vim-and-ubuntu/</link>
<pubDate>Sat, 02 May 2009 19:30:40 +0000</pubDate>
<dc:creator>ioconnor</dc:creator>
<guid>http://ioconnor.wordpress.com/2009/05/02/javascriptlint-vim-and-ubuntu/</guid>
<description><![CDATA[In my blog http://ioconnor.wordpress.com/2009/04/24/javascript-testing/ I looked into some tools to ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In my blog <a href="http://ioconnor.wordpress.com/2009/04/24/javascript-testing/">http://ioconnor.wordpress.com/2009/04/24/javascript-testing/</a> I looked into some tools to help in my JavaScript development. I haven&#8217;t had the time, (or urge?), to do anything until this morning. This morning though I got <a href="http://www.javascriptlint.com/index.htm">JavaScriptLint</a> working. The documentation at the site is less than adequate so I&#8217;m adding notes here to help me if I need to install it again in the future.</p>
<ol>
<li>The Linux download is here: <a href="http://www.javascriptlint.com/download.htm">http://www.javascriptlint.com/download.htm</a></li>
<li>After decompressing it you&#8217;ll notice there is only a single horribly wrong README.html file. To get things working compile it by going to the src directory and typing:<br />
<strong>make -f Makefile.ref </strong></li>
<li>A jsl will now be found in jsl-0.3.0/src/Linux_All_DBG.OBJ/jsl. To make it generally accessible do something like:<br />
<strong>ln -s /whatever/jsl-0.3.0/src/Linux_All_DBG.OBJ /my/bin/jsl </strong></li>
<li>Running jsl will show the parameters that are needed. If you are like me you&#8217;ll wonder where the configuration file is that they mention. It&#8217;s not on their website and it certainly is nowhere on my disk. So I googled around until I found it, or close to what it should probaly be, and have copied it down below. I called the file &#8220;jsl.conf&#8221; and stuck it in /my/bin/jsl.conf.</li>
<li>It&#8217;s all fine and good running it on the command line. It even looks at the javascript code in html files. I found quite a few questionable pieces of code and one clear mistake on my part that fortunately was not causing any problems. From the command line type something like:<br />
<strong>jsl -conf /my/bin/jsl.conf -process /my/dev/taxes2.html</strong><br />
The -conf /my/bin/jsl.conf is optional.</li>
<li>To run it from within vim by pressing the &#60;F9&#62; key edit the vimrc file and include something like:<br />
<strong>map &#60;F9&#62; : call JavaScriptLint()&#60;CR&#62;</strong><br />
<strong>func! JavaScriptLint()<br />
exec &#8220;w&#8221; &#8220;Save the file<br />
exec &#8220;!jsl -conf /my/bin/jsl.conf -process % &#8220;<br />
endfunc</strong></li>
</ol>
<p>I might change this so the editor dumps me on the line that&#8217;s bad with an error message. Or into an error file that can be toggled back and forth from. However it is usable enough for me in it&#8217;s current form.</p>
<p>The conf file I&#8217;m using looks like this:</p>
<blockquote><p>#<br />
# Configuration File for JavaScript Lint 0.3.0<br />
# Developed by Matthias Miller (http://www.JavaScriptLint.com)<br />
#<br />
# This configuration file can be used to lint a collection of scripts, or to enable<br />
# or disable warnings for scripts that are linted via the command line.<br />
#</p>
<p>### Warnings<br />
# Enable or disable warnings based on requirements.<br />
# Use &#8220;+WarningName&#8221; to display or &#8220;-WarningName&#8221; to suppress.<br />
#<br />
+no_return_value # function {0} does not always return a value<br />
+duplicate_formal # duplicate formal argument {0}<br />
+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}<br />
+var_hides_arg # variable {0} hides argument<br />
+redeclared_var # redeclaration of {0} {1}<br />
+anon_no_return_value # anonymous function does not always return a value<br />
+missing_semicolon # missing semicolon<br />
+meaningless_block # meaningless block; curly braces have no impact<br />
+comma_separated_stmts # multiple statements separated by commas (use semicolons?)<br />
+unreachable_code # unreachable code<br />
+missing_break # missing break statement<br />
+missing_break_for_last_case # missing break statement for last case in switch<br />
+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)<br />
+inc_dec_within_stmt # increment (++) and decrement (&#8211;) operators used as part of greater statement<br />
+useless_void # use of the void type may be unnecessary (void is always undefined)<br />
+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x&#8212;y) signs<br />
+use_of_label # use of label<br />
+block_without_braces # block statement without curly braces<br />
+leading_decimal_point # leading decimal point may indicate a number or an object member<br />
+trailing_decimal_point # trailing decimal point may indicate a number or an object member<br />
+octal_number # leading zeros make an octal number<br />
+nested_comment # nested comment<br />
+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma<br />
+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement<br />
+empty_statement # empty statement or extra semicolon<br />
-missing_option_explicit # the &#8220;option explicit&#8221; control comment is missing<br />
+partial_option_explicit # the &#8220;option explicit&#8221; control comment, if used, must be in the first script tag<br />
+dup_option_explicit # duplicate &#8220;option explicit&#8221; control comment<br />
+useless_assign # useless assignment<br />
+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity<br />
+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)<br />
+missing_default_case # missing default case in switch statement<br />
+duplicate_case_in_switch # duplicate case in switch statements<br />
+default_not_at_end # the default case is not at the end of the switch statement<br />
+legacy_cc_not_understood # couldn&#8217;t understand control comment using /*@keyword@*/ syntax<br />
+jsl_cc_not_understood # couldn&#8217;t understand control comment using /*jsl:keyword*/ syntax<br />
+useless_comparison # useless comparison; comparing identical expressions<br />
+with_statement # with statement hides undeclared variables; use temporary variable instead<br />
+trailing_comma_in_array # extra comma is not recommended in array initializers<br />
+assign_to_function_call # assignment to a function call<br />
+parseint_missing_radix # parseInt missing radix parameter</p>
<p>### Output format<br />
# Customize the format of the error message.<br />
# __FILE__ indicates current file path<br />
# __FILENAME__ indicates current file name<br />
# __LINE__ indicates current line<br />
# __ERROR__ indicates error message<br />
#<br />
# Visual Studio syntax (default):<br />
+output-format __FILE__(__LINE__): __ERROR__<br />
# Alternative syntax:<br />
#+output-format __FILE__:__LINE__: __ERROR__</p>
<p>### Context<br />
# Show the in-line position of the error.<br />
# Use &#8220;+context&#8221; to display or &#8220;-context&#8221; to suppress.<br />
#<br />
-context</p>
<p>### Semicolons<br />
# By default, assignments of an anonymous function to a variable or<br />
# property (such as a function prototype) must be followed by a semicolon.<br />
#<br />
+lambda_assign_requires_semicolon</p>
<p>### Control Comments<br />
# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for<br />
# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is<br />
# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,<br />
# although legacy control comments are enabled by default for backward compatibility.<br />
#<br />
+legacy_control_comments</p>
<p>### JScript Function Extensions<br />
# JScript allows member functions to be defined like this:<br />
# function MyObj() { /*constructor*/ }<br />
# function MyObj.prototype.go() { /*member function*/ }<br />
#<br />
# It also allows events to be attached like this:<br />
# function window::onload() { /*init page*/ }<br />
#<br />
# This is a Microsoft-only JavaScript extension. Enable this setting to allow them.<br />
#<br />
-jscript_function_extensions</p>
<p>### Defining identifiers<br />
# By default, &#8220;option explicit&#8221; is enabled on a per-file basis.<br />
# To enable this for all files, use &#8220;+always_use_option_explicit&#8221;<br />
-always_use_option_explicit</p>
<p># Define certain identifiers of which the lint is not aware.<br />
# (Use this in conjunction with the &#8220;undeclared identifier&#8221; warning.)<br />
#<br />
# Common uses for webpages might be:<br />
#+define window<br />
#+define document</p>
<p>### Interactive<br />
# Prompt for a keystroke before exiting.<br />
#+pauseatend</p>
<p>### Files<br />
# Specify which files to lint<br />
# Use &#8220;+recurse&#8221; to enable recursion (disabled by default).<br />
# To add a set of files, use &#8220;+process FileName&#8221;, &#8220;+process Folder\Path\*.js&#8221;,<br />
# or &#8220;+process Folder\Path\*.htm&#8221;.<br />
#<br />
#+process jsl-test.js</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[vim how to choose the encoding automatically]]></title>
<link>http://iwool.wordpress.com/2009/04/09/vim-how-to-choose-the-encoding-automatically/</link>
<pubDate>Thu, 09 Apr 2009 14:10:53 +0000</pubDate>
<dc:creator>wOOL</dc:creator>
<guid>http://iwool.wordpress.com/2009/04/09/vim-how-to-choose-the-encoding-automatically/</guid>
<description><![CDATA[~/.vimrc set fileencoding=utf-8 //here is encoding of file set fileencodings=ucs-bom,gb18030,utf-8,d]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>~/.vimrc</p>
<blockquote><p><code><br />
set fileencoding=utf-8<br />
//here is encoding of file<br />
set fileencodings=ucs-bom,gb18030,utf-8,default<br />
//here is the list for try<br />
</code></p></blockquote>
<p>From http://vim.dindinx.net/orig/html/options.txt.php</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Software Livre da semana: gVim Portable]]></title>
<link>http://victorwestmann.wordpress.com/2009/04/02/software-livre-da-semana-gvim-portable/</link>
<pubDate>Thu, 02 Apr 2009 11:33:45 +0000</pubDate>
<dc:creator>Victorino</dc:creator>
<guid>http://victorwestmann.wordpress.com/2009/04/02/software-livre-da-semana-gvim-portable/</guid>
<description><![CDATA[Que tal usar um editor de texto que serve para editar sites da internet, criar código em javascript,]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Que tal usar um editor de texto que serve para editar sites da internet, criar código em javascript, programar em python e ainda por cima fazer tudo isso com uma rapidez e eficiência enorme?</p>
<p>Tente o <strong>Vim</strong>!</p>
<ul>
<li><a href="http://www.vim.org/download.php#pc">Documentação</a></li>
<li><a href="http://www.vim.org/download.php">Download</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Cosas que hacen que Vim pase de molar a ser necesario]]></title>
<link>http://ecksblog.wordpress.com/2009/03/10/cosas-que-hacen-que-vim-pase-de-molar-a-ser-necesario/</link>
<pubDate>Mon, 09 Mar 2009 23:16:52 +0000</pubDate>
<dc:creator>eckelon</dc:creator>
<guid>http://ecksblog.wordpress.com/2009/03/10/cosas-que-hacen-que-vim-pase-de-molar-a-ser-necesario/</guid>
<description><![CDATA[Pese a que en mi paso a Mac, intenté darle una oportunidad a Textmate, no he podido. Y es que tras u]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Pese a que en mi paso a Mac, intenté darle una oportunidad a <a title="Textmate" href="http://macromates.com">Textmate</a>, no he podido. Y es que tras unas cuantas semanas me he dado cuenta de que mis líneas de código tenían lindezas como :wq y cosas así. Tuve que volver a <a title="Vim" href="http://vim.org">Vim</a>. Por varios motivos:</p>
<ul>
<li>Me he hecho a él</li>
<li>Aún no conozco sus límites</li>
<li>Lo puedo ejecutar en cualquier máquina:  hoy he tenido que picar código en un Windows, y Vim y el vimrc que llevo siempre conmigo, me han salvado la vida.</li>
</ul>
<p>El caso es que <a title="Capitán GoLo" href="http://capitangolo.net">GoLo</a> pese a que suele usar Vim para modificar cosas del sistema, a la hora de la verdad abre el <a title="Eclipse" href="http://eclipse.org">Eclipse</a>, y para según que cosas es normal (yo soy el primero que lo hace) pero para programar en Python, Perl o Php, me parece una burrada. Desde que empecé a usar Vim de verdad, suelo llevar encima una pequeña <a title="Moleskine @ Refugio" href="http://eckelon.net/2008/01/26/cuadernos-moleskine/">Moleskine</a> donde voy apuntando truquillos que me van haciendo más y más rápido a la hora de picar código. De este cuadernito he hecho una selección que le vendrá a GoLo que ni pintada <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Si no eres GoLo, también puedes usarla <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ¡Y hasta comentar!</p>
<p><strong>Inserciones (en modo normal)</strong></p>
<ul>
<li>i : empiezas a escribir a la izquierda de la letra sobre la que tienes el cursor</li>
<li>I : empiezas a escribir al principio de la línea en la que estás</li>
<li>a : empiezas a escribir a la derecha de la letra donde tienes el cursor</li>
<li>A : empiezas a escribir al final de la línea en la que estás</li>
<li>o : empiezas a escribir en la linea de abajo. Importantísimo.</li>
<li>O: empiezas a escribir en la línea de arriba</li>
</ul>
<p><strong>Moverse por el texto (en modo normal)</strong></p>
<ul>
<li>e : pone el cursor al final de la línea</li>
<li>b: pone el cursor al principio de la línea</li>
<li>yy : copia la línea actual</li>
<li>dd : corta la línea actual</li>
<li>y3y o d3d: copia o corta 3 líneas, hacia abajo desde la que está el cursor. Esto es genial para mover grandes bloques de texto de un lugar a otro. (Si GoLo, si, como me dijiste que hace el Eclipse <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</li>
</ul>
<p><strong>Otros, pero no menos importantes</strong></p>
<ul>
<li>:1,$ s/hola/mundo/g : reemplaza de la línea 1 hasta el final todas las palabras &#8220;hola&#8221; por &#8220;mundo&#8221;. Si cambiamos $ por un 5, lo hará en las 5 primeras líneas, y si cambiamos el 1 por un 5 lo hará de la línea 5 hasta el final. Si solo lo queremos para un pequeño bloque de texto, pues, tan sencillo como poner las dos líneas entre las que quieres acotar. En que le coges el tranquillo, lo echas de menos en todas las</li>
<li>:set nu : activa la numeración</li>
<li>:tabnew : abre nueva pestaña</li>
<li>gt : para moverse entre las pestañas. Comodísimo.</li>
<li>:tab sba : abre todos los buffers activos en pestañas. Utilísimo.</li>
</ul>
<p>Me dejo muchos en el tintero, pero estos son imprescindibles <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Seguiré añadiendo más poco a poco <a title="Vim @ Refugio" href="http://eckelon.net/tag/vim/">para la sección de Vím</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  GoLo, espero haberte convencido <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim: EnhancedCommentify，一个好用的注释插件]]></title>
<link>http://mrwlwan.wordpress.com/2009/03/07/vim-enhancedcommentify%ef%bc%8c%e4%b8%80%e4%b8%aa%e5%a5%bd%e7%94%a8%e7%9a%84%e6%b3%a8%e9%87%8a%e6%8f%92%e4%bb%b6/</link>
<pubDate>Sat, 07 Mar 2009 04:04:11 +0000</pubDate>
<dc:creator>Ross Wan</dc:creator>
<guid>http://mrwlwan.wordpress.com/2009/03/07/vim-enhancedcommentify%ef%bc%8c%e4%b8%80%e4%b8%aa%e5%a5%bd%e7%94%a8%e7%9a%84%e6%b3%a8%e9%87%8a%e6%8f%92%e4%bb%b6/</guid>
<description><![CDATA[如果不习惯于“老老实实”地一行一行添加注释符的话，可以试下 EnhancedCommentify 这个 Vim 的插件。它对支持目前大多数文件格式的注释，如 PHP、Python、Java、C/C++]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>如果不习惯于“老老实实”地一行一行添加注释符的话，可以试下 EnhancedCommentify 这个 Vim 的插件。它对支持目前大多数文件格式的注释，如 PHP、Python、Java、C/C++ 等等。</p>
<p><a href="http://www.vim.org/scripts/script.php?script_id=23" target="_blank">下载地址</a></p>
<p>执行 :call EnhancedCommentify(&#8216;yes&#8217;,'comment&#8217;) 即对当前行进行注释；反之，执行 :call EnhancedCommentify(&#8216;yes&#8217;,'decomment&#8217;) 则对当前行进行反注释。</p>
<p>为了使用方便，可以对上面的命令进行键盘映射：</p>
<pre class="literal-block" style="margin-left:2em;margin-right:2em;background-color:#e8e9ea;">" 设置注释
map &#60;F2&#62; &#60;Esc&#62;&#60;Esc&#62;:call EnhancedCommentify('yes','comment')&#60;CR&#62;
" 取消注释
map &#60;F3&#62; &#60;Esc&#62;&#60;Esc&#62;:call EnhancedCommentify('yes','decomment')&#60;CR&#62;</pre>
<p>具体的使用方法，可以查看插件里面的 doc。</p>
<p>Have fun <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[gvim tips]]></title>
<link>http://ioconnor.wordpress.com/2009/03/01/gvim-tips/</link>
<pubDate>Sun, 01 Mar 2009 16:53:54 +0000</pubDate>
<dc:creator>ioconnor</dc:creator>
<guid>http://ioconnor.wordpress.com/2009/03/01/gvim-tips/</guid>
<description><![CDATA[This post will be updated every time I have to do something in vim taking more than a few seconds to]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This post will be updated every time I have to do something in vim taking more than a few seconds to get right. Or when I find interesting reference information I don&#8217;t know or forget on a regular basis. The idea is to include everything I do and need with vim in this post.</p>
<p>I prefer using gvim for some reason. Don&#8217;t really have a reason I can remember. The useless toolbar on top can be turned off with:</p>
<blockquote><p>set guioptions-=T</p></blockquote>
<p>The most useful command in all of vi/vim land I have ever used is the following held within the .vimrc or whatever. It allows the line under the cursor to be executed. With clever useage vi becomes very useful. I&#8217;ve used it on all versions of vi for decades.</p>
<blockquote><p>:map ** &#8220;zyy:@z</p></blockquote>
<p>along with the following that needs to sometimes be modified heavily depending on the version of vi. This allows you to bounce between the two buffers with just a keystroke. (Removing the ability to use the standard &#8216;;&#8217; for what it was intended for.)</p>
<blockquote><p>:map ; :e#</p></blockquote>
<p>When viewing a downloaded google spreadsheet in csv format of all deposits the following displays the summary of each deposit</p>
<blockquote><p>:g/^\d\{1,3},&#8221;\p\{-}&#8221;,200 </p></blockquote>
<p>Removes the first 7 words of each line and replaces them with &#8220;rm &#8220;. Helpful when editing a file made with &#8220;ls &#62; file&#8221;.</p>
<blockquote><p>:%s/\(\S\+\s\+\)\{7\}\(.*\)/rm \2 /</p></blockquote>
<p>Using vim&#8217;s internal sort. Start by marking the beginning and ending line with say &#8216;b&#8217; and &#8216;e&#8217;. (Note the &#8216;}&#8217; does not help in specifying range unfortunately.) Then type:</p>
<blockquote><p>:&#8217;b,&#8217;esort</p></blockquote>
<p>I&#8217;m always forgetting vim&#8217;s regexps metacharacters. The following I stole from this excellent guide <a href="http://www.geocities.com/volontir/" target="_blank">http://www.geocities.com/volontir/</a></p>
<blockquote>
<table border="0">
<tbody>
<tr>
<td>.</td>
<td>any character except new line</td>
</tr>
<tr>
<td>\s</td>
<td>whitespace character</td>
</tr>
<tr>
<td>\S</td>
<td>non whitespace character</td>
</tr>
<tr>
<td>\d</td>
<td>digit</td>
</tr>
<tr>
<td>\D</td>
<td>non-digit</td>
</tr>
<tr>
<td>\x</td>
<td>hex digit</td>
</tr>
<tr>
<td>\X</td>
<td>non-hex digit</td>
</tr>
<tr>
<td>\o</td>
<td>octal digit</td>
</tr>
<tr>
<td>\O</td>
<td>non-octal digit</td>
</tr>
<tr>
<td>\h</td>
<td>head of word character (a,b,c&#8230;z, A,B,C&#8230;Z and _)</td>
</tr>
<tr>
<td>\H</td>
<td>non-head of word character</td>
</tr>
<tr>
<td>\p</td>
<td>printable character</td>
</tr>
<tr>
<td>\P</td>
<td>like \p, but excluding digits</td>
</tr>
<tr>
<td>\w</td>
<td>word character</td>
</tr>
<tr>
<td>\W</td>
<td>non-word character</td>
</tr>
<tr>
<td>\a</td>
<td>alphabetic character</td>
</tr>
<tr>
<td>\A</td>
<td>non-alphabetic character</td>
</tr>
<tr>
<td>\l</td>
<td>lowercase character</td>
</tr>
<tr>
<td>\L</td>
<td>non-lowercase character</td>
</tr>
<tr>
<td>\u</td>
<td>uppercase character</td>
</tr>
<tr>
<td>\U</td>
<td>non-uppercase character</td>
</tr>
</tbody>
</table>
</blockquote>
<p>Non-greedy quantifiers where n and m are positive integers (&#62;0): </p>
<blockquote>
<table border="0">
<tbody>
<tr>
<td>\{-}</td>
<td>matches 0 or more of the preceding atom, as few as possible </td>
</tr>
<tr>
<td>\{-n,m}</td>
<td>matches 1 to m of the preceding characters&#8230;</td>
</tr>
<tr>
<td>\{-n,}</td>
<td>matches at least 1 or more of the preceding characters&#8230; </td>
</tr>
<tr>
<td>\{-,m} </td>
<td>matches 1 or more of the preceding characters&#8230; </td>
</tr>
</tbody>
</table>
</blockquote>
<p>The greedy options have all the obvious non-greedy options plus the semi-obvious extras as follow</p>
<blockquote>
<table border="0">
<tbody>
<tr>
<td>\{n}</td>
<td>Matches exactly n characters. It is not greedy or non-greedy.</td>
</tr>
<tr>
<td>*</td>
<td>Greedily matches 0 or more of the preceding whatever. &#8220;.*&#8221; matches everything including an empty line. Notice there is no backslash before the &#8216;*&#8217;</td>
</tr>
<tr>
<td>\+</td>
<td>Matches 1 or more of the preceding whatever.</td>
</tr>
<tr>
<td>\=</td>
<td>Matches 0 or 1 of the preceding whatever.</td>
</tr>
</tbody>
</table>
</blockquote>
<p>There are valuable replacement options:</p>
<blockquote>
<table border="0">
<tbody>
<tr>
<td>&#38; </td>
<td>The entire part matched by the pattern.</td>
</tr>
<tr>
<td>\1</td>
<td>When 1 is used it is the first pattern. A 0 is the same as the &#38; above and probably makes more sense. I don&#8217;t know if two digit numbers can be used or if it stops at 9.</td>
</tr>
<tr>
<td>~</td>
<td>The previously substituted string.</td>
</tr>
<tr>
<td>\L \U \E \e</td>
<td>Turns upper or lower case on until either of the end control characters are encountered.</td>
</tr>
<tr>
<td>\r</td>
<td>Splits the line in two by adding a return character.</td>
</tr>
<tr>
<td>\l \u</td>
<td>Makes the next character upper or lower case.</td>
</tr>
</tbody>
</table>
</blockquote>
</div>]]></content:encoded>
</item>

</channel>
</rss>
