Archive

Archive for September, 2010

Creating and Using a VIM Scratch File

September 22nd, 2010 No comments

” put following in your _vimrc

” store for useful text, reusable stuff, code sections
map <f4> :tabe c:/aax/store.txt<CR>
imap <f4> :tabe c:/aax/store.txt<CR>

Hit the F4 key to open store.txt  in a separate tab.  I’ve currently  got a few snippets of Perl I need frequently , a few telephone numbers etc. I find it very useful. The VIM maps above are not rocket science and you will see how to vary them for your own requirements.

Categories: vim Tags:

Regexp to split XML Tags into one tag per line

September 20th, 2010 No comments

I was working with an XML file which was all jumbled onto one line. I wanted to split the XML tags out to make them human readable.

This is the Regexp I used puts a carriage return between all >< but not ></

%s#><\([^/]\)#>\r<\1#g

This neatly separates the tags into one tag per line. Note the use of regex memory .

Categories: regexp Tags:

Locking/Protecting Tabs in Firefox

September 18th, 2010 No comments

You have probably known the frustration of accidentally closing a tab you really need eg one where you have been patiently completing a form.  Fortunately there is a Firefox add on Tabberwocky which allows to lock and or protect a tab. I’m not sure of the difference yet but I think one of them means that the tab will reopen the next time you close/open Firefox.

Categories: windows Tips Tags: