Here are a couple of simple tips to help you in the hard task of programming in VIM (the hard task is to write the code, not to do it in VIM, of course :) )
Inserting 50 symbols to create a header
Normaly it is a good idea to remark something within a program using comments. It's just something like
#########################################
# HERE GO IMPORTANT VARIABLES!
#########################################
In general, writing a large numbers of symbols is not a hard task, but it can be even easier using VIM. You only have to type a character, and repeat the order many times. To do this, use the command
100i#and press ESC, and you will get a hundred symbols "#" all together. Later just push "." to repeat the last command. You will have exactly 2 lines of 100 symbols having pressed only 7 keys. Oh yeah.
Commenting several lines of code with few commands
This tip is less silly than the former one, and it may save you a lot of time. Unfortunately I don't know illustrate it, so I'll try to explain in my own words. Imagine you want to comment 20 lines, inserting some character (for example "#", but it may be other depending on the language of your choice) in the first column of these lines. To do it in VIM, use the block selection tool by pressing "ctrl+v" in command mode (remember that "v" is to use the standard selection, whereas "V" is the line selection). Then, select the first character, and only the first one!, in every line you want to comment. In this moment, press "I" (capital "i", the lowercase does not work) and type the character that you want to insert in every selected line. At the moment you will only see the change in the first line, but after pressing ESC, all selected lines will be commented automatically.
I don't even know how I could live without this! :)
4 Comments:
niceeeee :)
Yeah, I worth it!
[Off topic]
Hi, Ontureño,
I think you are the same user who wrote this comment in amazings.es.
Given that you mentioned that your work deals with paleoclimate, I'm writing you because I recently reported in my blog on this paper showing temperatures in northern Spain being high in a 4000-year context, and I've just received this skeptical comment on the subject giving some references that purportedly show cooler temperatures in other areas of Spain compared to medieval times. It seems that his referecnes are ok, but if you could give us some context on the subject of paleo-temperatures in Spain, I'd be very grateful.
Warm Regards,
Jesús R.
I guess you'll want to put a facebook icon to your website. Just marked down this blog, however I must complete this by hand. Simply my suggestion.
Post a Comment