Fedora 18 features

Fedora Engineering Steering Committee has recently had a meeting where the upcoming Fedora 18 features were decided.  Out of the whole list, I am actually really looking forward to just one – 256 color terminals:

Many terminal programs (like vim and ls for example) can take advantage of 256 color terminals, and all xterms I know of support at least 256 colors and sometimes more.
So let’s break through the artificial 8 color limit!

Also when preparing this page, while searching the net I noticed that Mac OS X Terminal’s default $TERM value is xterm-256color since Lion 10.7 That will ease some of the compatibility issues noted below.

You can see vim’s default appearance using the above expanded palette at:

http://www.pixelbeat.org/docs/terminal_colours/#256

Sure, the upgraded Perl and Python, Samba4 and Active Directory integration, FedFs and even the MATE Desktop (based on Gnome 2.x) are all cool.  But I don’t use any of them on a daily basis anymore.  Most of my needs have moved beyond desktop and straight into the browser.  But the colorful terminal still plays a major role in my daily routine, so I’m glad to see there will be an enhancement.

What’s your most expected feature?

Vim adventures

Vim is quite famous for being the best text editor in the world.  However it has quite a learning curve, especially for people who don’t touch type and who aren’t much interested in their own productivity.  Over the years, there were a few efforts to help the newcomers learn the basics.  But, I think, nothing came close to the amazing game Vim adventures – a maze navigation game, that uses Vim controls.

Vim tips of the day

I’m using Vim text editor for more than decade now.  And I still can’t say I really know Vim.  I’m used to it and my fingers remember the commands.  And for those commands that I don’t remember, I’ve found some way of working around and got used to it too.  Today I came across not one, but two tips that I’m adding to my arsenal of Vim tricks.

Re-selecting visual block

Usually I only need to select the block once.  I then process it and never get back to it.  But sometimes, I need to select the same section of the text a few moments later.  Until today I was simply switching to visual selection and marking the block again.  Not too much of a problem, but it would be nice to have a shortcut for re-selecting the previous selection.  Of course, there is such a shortcut in Vim.  I just didn’t know it.  Simply type ‘gv‘ (without quotes) while in normal mode and your last visual selection will be selected again.

Increasing line limit on cross-file copying

There is no limit to number of lines copied between files, if all files are being edited in the same instance of Vim.  However if you copy a large selection from one file, then quit Vim, then open another file, and paste, you’ll probably see that only the first 50 lines or so were copied and the rest was lost.  Again this is not such a frequent scenario for me, and when it was happening I was simply opening both files in the same instance of Vim and copy all that I needed.  It turns out, I don’t really have to do that.

Vim uses ~/.viminfo file (default location) to remember things like command history, file marks, and registers between Vim instances.  There is a way to configure what and how much of what is going into this file.  If you are annoyed by any limits, you can easily raise them or totally remove them.  Have a look at “:help ‘viminfo’” manual page to see what is possible.   Adding “set viminfo=’100,<1000,s100” to ~/.vimrc file solved my problem.

 

P.S.: my messy Vim configuration files are available from GitHub, in case you wanted to take a pick at what else I have there.

Moved to gvim

After years of using Vim, I recently moved to its graphical version – gvim. It turned out that things that I didn’t like about gvim are trivial to fix.

set guifont=Console
set guioptions-=m " No menu
set guioptions-=T " No toolbar
set guioptions+=c " Use console dialogs where possible

You’d probably want to read “:help guioptions” for more.

Now there is a greater variety of colorschemes to choose from, and, finally, I can have italic font for comments in the code – nothing beats that!