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

using cscope with vim

2010-01-08 0 min read Linux Vim Tips
\"Google
Image by schoschie via Flickr

Here&#8217;s the best of the two links that I found with <a class="zem_slink freebase/en/google" title="Google" rel="homepage" href="http://google.com">Google and <a class="zem_slink" title="Bing" rel="homepage" href="http://bing.com/">Bing combined out of lots of links that I think can help you understand how to use cscope with vim, if you dont know already.

<a href="http://cscope.sourceforge.net/cscope_vim_tutorial.html">http://cscope.sourceforge.net/cscope_vim_tutorial.html
<a href="http://www.faqs.org/docs/ldev/0130091154_242.htm">http://www.faqs.org/docs/ldev/0130091154_242.htm

Continue reading

7 Examples for Sed Hold and Pattern Buffer Operations

2009-12-22 0 min read Linux
\"View\"\"More\"Tags\"\"Comments\"\"Share\"\"Send\"\"Favorite\"\"Twitter\"\"Facebook\"

<a href="http://www.flickr.com/photos/35237104750@N01/259102613"><img id="kwiclick-temp-0" title="txt e-book" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/259102613_bd9628c791_m.jpg" alt="txt e-book" />

<dd class="wp-caption-dd zemanta-img-attribution">Image by <a href="http://www.flickr.com/photos/35237104750@N01/259102613">pqs via Flickr

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

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