enki editor – amazing for md and rst files

2016-09-12 1 min read Fedora
First, you need to install enki. YOu can do so with sudo yum install enki And then you can use the editor as usual. The first thing that you will notice is the navigator window. And here is screenshot for you. Enki Editor main window As you can see if you make a typo or mistake then you will immediately be warned with RED color. The preview windows keeps updating with the latest preview and thus you always know how your markdown or restructured text files will finally look like. Continue reading

bash – using the vi mode more effectively.

2013-11-22 1 min read bash
Vi blogging bundle (Photo credit: pedro mg) You can first set the bash mode to vi. This will enable some vim like features to bash. So, add this to .bashrc : set -o vi Once, you have done that then its time to get more out of the vi mode. First, check some things and set some interesting stuff. #Display all the bindings : bind -P #Copy the current bindings and use it in inputrc: bind -p |grep -v self-insert>~/. Continue reading

vim maps – simple commands to do stuff.

2013-08-28 1 min read Vim Tips
Some time back, I was working on some script for logging and I wanted to change the class to function like this: $logger->Debug("Test string"); loggerFunc("Debug", "Test String"); As you can see, this change could be quite frustrating if you have quite a few references. And thus vim comes to rescue. Simple map like :: :map ,mm :s/(.*)$logger->(.*)((.*)).*/1loggerFunc("2",3);/ and then I can do “/$logger->” and then “n” to go to next match. Continue reading

Vim – Why and where am I getting these errors from?

2013-05-15 1 min read Vim Tips
If you have got this question in your mind, then you are in right place. vim -V20 2>&1 |tee You can give the debugfile as any file, where you would want to log the debug messages. This will log a lot of information in the debugfile, you can open the file, once you have got the error in the main vim window. After this, you can open the debugfile and simply search for the error that you were getting. Continue reading

vim mappings for multiple files.

2012-08-06 1 min read Vim Tips
If you open multiple files in vim with command line option. Then the only way to move between the files is “:n” and “:N”. There is a easier way to do this. Just add mappings for this in vimrc. Here is what you can use. map :N map :n And if you want to make sure that you move to the prev or next file after saving the file, then you modifyt the mapping like this: Continue reading

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
Older posts