Built-in lists in vim

2010-02-03 1 min read Learning Linux Vim Tips
<a class="zem_slink freebase/en/vimscript" title="Vimscript" rel="wikipedia" href="http://en.wikipedia.org/wiki/Vimscript">Vimscript provides excellent support for operating on collections of <a class="zem_slink freebase/en/data" title="Data" rel="wikipedia" href="http://en.wikipedia.org/wiki/Data">data, a cornerstone of programming. In this third article in the series, learn how to use Vimscript&#8217;s built-in lists to ease everyday operations such as reformatting lists, filtering sequences of filenames, and sorting sets of line numbers. You&#8217;ll also walk through examples that demonstrate the power of lists to extend and enhance two common uses of <a class="zem_slink freebase/en/vim" title="Vim (text editor)" rel="homepage" href="http://www. Continue reading

Multiple search in vim

2009-11-19 1 min read Learning Linux
I was looking at a log file and needed to highlight multiple search items to make the logs more readable. I got into multiple threads suggesting various cryptic vim commands but I was in no mood to remember them. So, I finally hit <a href="http://www.vim.org/scripts/script.php?script_id=479" target="_blank">this. This is a cool vim script which you can use to highlight multiple search patter. You can simply add a search term by doing Continue reading

stop indentation on current file in vim to keep the indentation from copied text.

2009-10-22 1 min read Linux Vim Tips
I have been looking for this for quite some time. Finally found two easy ways to do it: :setlocal noautoindent :setlocal nocindent :setlocal nosmartindent :setlocal indentexpr= Just use the above four commands when the file is already open to stop all the indentation/smart indentation/auto indentation in vim for the current file. If you want to map it then you can use shorthand notations and map it in the .vimrc file. Continue reading
Newer posts