vim search multiple files

2010-03-25 1 min read Linux Vim Tips

Searching some pattern in multiple files is something that is required very often. There are multiple ways to do it, like <a class="zem_slink freebase/en/grep" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep, <a class="zem_slink freebase/guid/9202a8c04000641f8000000006b66ec6" title="Ack (command-line utility)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Ack_%28command-line_utility%29">ack, find and so on so forth. But if your editor already has the capability to do that, then why leave your favourite vi and go to shell. I will point you to some scripts and some wiki pages on how to do this 🙂

Continue reading

eclim for Fedora – Leonidas – installation.

2010-03-08 1 min read Linux Vim Tips

Here is the installation instruction for Eclim for vim. I have not tried it as I did not require it, but if you need it.

http://downloads.sourceforge.net/project/eclim/eclim/1.4.8/eclim_1.4.8.tar.gz?use_mirror=biznetnetworks

sudo ant -Declipse.home=/usr/lib/eclipse -Dvim.files=/home/amitag/.vim -Dplugins=cdt

create ctgs using

ctags -R /usr/include/<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://spf13.com/post/vim-crash-course">VIM Crash Course (spf13.com) <li class="zemanta-article-ul-li"><a href="http://go.theregister.com/feed/www.theregister.co.uk/2010/01/26/sourceforge_ip_address_filtering/">SourceForge bars 5 nations from open source downloads (go.theregister.com) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/01/22/my-project-in-sourceforgenet-gnomedesktopwal/">My project in sourceforge.net gnomedesktopwal (amit-agarwal.co.in) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/0fb78d60-4b1a-4563-8ffa-f572041a3a64/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b13.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

Continue reading

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.vim.org/">Vim: creating a <a class="zem_slink freebase/en/user_defined_function" title="User-defined function" rel="wikipedia" href="http://en.wikipedia.org/wiki/User-defined_function">user-defined function to align assignment operators, and improving the built-in text completions mechanism.

Continue reading

Know when you will type :q in your term instead of vi(m), the alias will chewed you out.

2009-12-20 1 min read Bash Vim Tips

most simple solution is to alias :q like so:
alias :q=`echo &#8221;This is not vim&#8221;`

but as someone suggested in commandlinefu, you can use tput to put some color and fun into this.
alias :q=&#8217;tput setaf 1; echo >&2 &#8221;this is NOT vi(m) :/&#8221;; tput sgr0&#8217;

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

Vi/VIM and Unix/Linux cheatsheets.

2009-10-26 1 min read Linux

I found quite a lot of good information today morning.

Some really good info on vi/vim. I liked the this one:&#8221;Also, you don&#8217;t have to use the / command as a separator. Anything typed after s will become the separator&#8221;

<a href="http://ask.slashdot.org/article.pl?sid=08/11/06/206213&from=rss" target="_blank">http://ask.slashdot.org/article.pl?sid=08/11/06/206213&from=rss

Some of the best collection of vi/vim tips: (though a lot of them do not have explanations)

<a href="http://vim.wikia.com/wiki/Best_Vim_Tips" target="_blank">http://vim.wikia.com/wiki/Best_Vim_Tips

Top 10 Best Cheat Sheets and Tutorials for Linux / UNIX Commands

Continue reading
Newer posts