g flag in :s useless in vim

2011-11-05 1 min read Vim Tips

Some time back there was a post on vim_use list about the “/g” flag for the search and replace functionality of the vim. And the response of “Tim Chase” on the same was very elaborate and interesting. I always knew that “/g” is only for replacing multiple occurrences on the same line, but here are few things that I did not know.

   :0/this/s//that

This one will only replace the first occurrence of this in the whole file.

Continue reading

debug call function() to debug a function in vim

2011-09-04 1 min read Vim Tips

Drawn in Autosketch + pasting in words from Excel
Image via Wikipedia

Have you ever wished that you could either see what is going on initially at the vim startup like you could do with C program in the gdm mode, but really did not want to go through gdb. Or rather you sometime felt that some function defined by some plugin is causing some issue and you wanted to debug just that function. Well you need not wish anymore, the functionality is already there.

Continue reading

vim autocomplete – automagically without tab.

2011-04-16 1 min read Learning Linux Vim Tips

Lets first do the setup in one line. Get my vim script downloader.

Use the script to add the script with script ID : :1879 (vim-autocomplpop) to your list of plugins for vim and you  are done.

 

If you are using snipmate, then make sure that you read the description of the plugin to add the required lines to the vimrc file to get the full functionality. You would love to type henceforth in your favourite editor. We will talk about more on Intellisense in few days time.. Chao till then.

Continue reading

what is vim in 6Kb..

2011-03-16 1 min read Learning Linux Vim Tips

If you thought that vim is very bloated and nothing abuot this editor can be small, then you are not alone. I was myself in the same bandwagon.

 

Well, I never thought that there could be anything about vim that can be explained in Kb’s, lest alone the complete vim features. But looks like vim.org had thought about this and thus came up with this. And here is the direct link to the vim in 6kb in English.

Continue reading

All in one solution for all the scripts of vim from vim.org

2011-03-09 9 min read Bash Fedora Learning Linux Vim Tips

For quite sometime now, I was looking for some console based program which would help me get the scripts from vim.org. A simple solution would have been to do a wget for the scripts. But since there are so many scripts coming up daily and with a need to search based on script ID and name of the script, I thought better to write a script that can do all of those things. Now, what was required was that the script should be either able to download this or add to the GLVS script. Also note that, I had done something similar in the past here. There are some additions in the below script. You can download a copy of the script get_vim_scripts. Or you can copy the script from below:

Continue reading

[Solved] Abbreviations not working in vim

2010-10-02 1 min read Bash Learning Vim Tips

Today I found that abbreviations are not working in vim in my current login. I searched log of blog’s and sill did not find any solution so I decided to take the matters in my hand.

To start with I disabled all the plugin’s by moving my plugin directory. This did not help me solve the issue, so the only other option left was to now disable the vimrc file completely. Once I removed the vimrc file, the abbreviations started working.

Continue reading

Make better use of the scripting feature in the vim editor

2010-07-23 1 min read Vim Tips

There is a nice tutorial on the <a target="_blank" href="http://www.ibm.com/developerworks/linux/library/l-vim-script-1/index.html?ca=dgr-lnxw82&S_TACT=105AGX59&S_CMP=grlnxw82">Scripting the vim editor

I liked it, hope you too like it.<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/pixy7.gif" />

Older posts Newer posts