jumps and marks in vim

First we will talk about jumps in vim. Very useful for navigation and jumping around the vim. The jumps are commands that lets you jump from one location to another location, like {{ or [[ and so on … From the help file of vim

A \”jump\” is one of the following commands: \”\’\”, \”`\”, \”G\”, \”/\”, \”?\”, \”n\”,
\”N\”, \”%\”, \”(\”, \”)\”, \”[[\”, \”]]\”, \”{\”, \”}\”, \”:s\”, \”:tag\”, \”L\”, \”M\”, \”H\” and
the commands that start editing a new file.  If you make the cursor \”jump\”
with one of these commands, the position of the cursor before the jump is
remembered.  You can return to that position with the \”\’\’\” and \”“\” command,
unless the line containing that position was changed or deleted.

Now what good is a remembered if you cannot go to that location directly with a shortcut. Correct, shortcuts and lists of the commands are important and the developers of the best editor did not forget that (Note that you need the jumplist feature for this):

CTRL-O                  Go to [count] Older cursor position in jump list(not a motion command).
CTRL-I                  Go to [count] newer cursor position in jump list(not a motion command).In a |quickfix-window| it takes you to the position ofthe error under the cursor.

:ju[mps]                Print the jump list (not a motion command).

You can read more about jumps in the editor itself with \”:help jump\”

Now lets talk about marks. Marks can be assumed to be named jumps in most simple form. And adding a mark is also very simple

press m<any character/number>

m{a-zA-Z}               Set mark {a-zA-Z} at cursor position (does not move the cursor, this is not a motion command).m\’  or  m`              Set the previous context mark.  This can be jumped to with the \”\’\’\” or \”“\” command (does not move the cursor, this is not a motion command).
m[  or  m]              Set the |\'[| or |\’]| mark.  Useful when an operator is to be simulated by multiple commands.  (does not move the cursor, this is not a motion command).

and jumping to a mark can be done in two ways:

1. With ` (backtick):     The cursor is positioned at the specified locationand the motion is |exclusive|.
2. With \’ (single quote): The cursor is positioned on the first non-blank character in the line of the specified location and the motion is linewise.

To list all the marks you can use the command marks as so:

:marks {arg}            List the marks that are mentioned in {arg}

*:delm* *:delmarks*
:delm[arks] {marks}     Delete the specified marks.  Marks that can be deleted include A-Z and 0-9.  You cannot delete the \’ mark.

There are three classification of the marks based on how they can be used or defined :

\’a – \’z         lowercase marks, valid within one file
\’A – \’Z         uppercase marks, also called file marks, valid between files
\’0 – \’9         numbered marks, set from .viminfo file

You can read more about marks in vi editor with \”:help marks\”

You can get some info at the below link also:



Change cursor and couple of other settings in window managers like fluxbox and fvwm (except gnome and KDE)

First off, get cursor theme from here. You can download the one of your choice. Now create a directory \”~/.icons\” if it does not exist. Extract the file you just downloaded in this directory. [If you are using GNome then you could have dropped the tar file itself in the Desktop properties window and selected the theme from there. I have since the days of RH9 not used KDE and so am not sure how to do this in KDE, sorry guys.]

Ok, now the interesting part, to get the cursor theme working in your window manager, for that matter any window manager.

The resources in X windows are controlled and decorated by the RESOURCE_MANAGER (for the deeply interested in the internals of X Window, if the name is not appropriate, please excuse me and leave a comment and I will definitely correct it 🙂

So, we want to define our cursor for the X window itself and not depending on the window manager. So, we will create a \”~/.Xdefaults\” file for the same. Here is the content of the file:

Xcursor.theme: ComixCursors-Orange-Small-Slim

Here all the extracter files with the directory called cursors is located in ~/.icons/ComixCursors-Orange-Small-Slim and I want to use the cursors in that directory as my default cursor. Also note that the cursors are named according to the standards, so you do not need to select anything. Good to go now.

Wait, the cursors still do not work. 🙁

Oh well, we need to tell the xrdm, the manager to manage the resources of our changes. So let do it.

xrdb -merge ~/.Xdefaults

We could use, xrdb -load ~/.Xdefaults as well, but that is used to override settings rather than merge them and thus will avoid this for the time being.

Now, lets restart the WM alone and see the cursors in use. If the settings are for other windows like the XTerm or any other terminal or for emacs or so on, you do not need to anything other than invoking the client again, but for cursors, please re-start the window manager.

So, there are actually so many things that you can do with the xrdb that I can keep writing about it, but then there are already so many articles available on the net, why not just refer you to them.

Good Ref:



Example: http://fluxbox-wiki.org/index.php?title=Howto_setup_Xdefaults