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:

http://www.linux.com/archive/articles/54159

\"Reblog

Deleting lines from the text file

Really useful for pretty big files.

sed –silent \’1,100 d\’ filename

here the command will delete the first 100 lines. You can specify whatever range you want. This will not delete the lines from the file but only display the contents on the console after deleting the 100 lines from begining.

If you want to store it in different file then you can use \”>\” or \”>>\”

\"Reblog

How To Modify Your WordPress Theme Via The Browser Using Stiqr


\"\"
\"\"

\"00_Stiqr_logo.jpg\"Ordinary self-hosted WordPress users know only too well that even though choosing and using thousands of available themes is a snap, creating one is an almost impossible task. You could use one of the customizable themes to modify the look to your liking, but that’s as far as you can go. Theme creating is not for the faint-hearted who are afraid to plunge into HTML, PHP and CSS coding.

But that’s not the case anymore. I recently stumbled across a WordPress theme editor plugin called Stiqr – still in beta as every other Web 2.0 service is – which can help ordinary web users to become a “skillful” web designer. If you can drag and drop objects, you can modify the look of your web. Self-hosted WordPress is officially included in the list of supported type of websites.

\"Wordpress

And everything is done without the need for a standalone web builder application, or the coding knowledge. All you need is a browser.

\"Wordpress

Setting Up The Stage

If you’ve always wanted to design your own website but the all the technical terminologies scared you, now is the perfect time for you to start. Visit Stiqr and click on the “Get Started Now“.

\"Wordpress

But don’t expect to see the ordinary sign-up process because it’s not that obvious. Before going through the “Enter Your Name” and “Enter Your Email” routines, you have to insert one line of code in your website. But you don’t have to tremble with fear, because all the steps are painless in WordPress.

Stiqr will provide you with the code, save it to be used later.

\"wordpress

Armed with the code, login to your WordPress.

\"wordpress

Then navigate to the right sidebar, and click “Editor” under the “Appearance” menu.

\"wordpress

Within the WordPress theme editor plugin, find the “Footer (footer.php)” and click on the link to edit.

\"wordpress

You will see the editable lines of codes for “footer.php“. Navigate to the lower part of the codes and find the closing line for the body – “</body>” – and insert the code that you got from Stiqr above it. Then click the “Update File” button.

\"wordpress

After the “File edited successfully” notification appear, go to the main page of your WordPress by clicking “Visit Site” button next to the title of your blog.

\"wordpress

That concludes the preparation stage.

Turn Your WordPress Into A Sticker Scrapbook

On the front page of your WordPress blog, press the key combination of “Shift + F2” to start Stiqr. As a first time Stiqr user, you will have to register first. Start by entering your email address and click “OK“.

\"wysiwyg

Then continue by choosing your preferred password followed by another “OK“. My advice: please come up with a strong password for this one.

\"wysiwyg

If the registration is successful, a notification window will pop-up along with a thank you note and what to do next: wait for the page to be refreshed and press “Shift + F2” button one more time.

\"wysiwyg

You will be asked to enter your password to log in. Some might think that this step is unnecessary, but you really need the protection since everybody could access this page. You don’t want anybody to mess around with the look of your site, do you? This is also the reason why you need a strong password.

\"09

Upon successful login, an editor bar will appear at the bottom of your page. You can start using the tools and let your creativity go wild.

\"10

I will save the the discussion about editing the look of your webpage using Stiqr for the next part of this article. Until then, you can experiment and get yourself familiar with this cool web-based WYSIWYG web editor.

So far, my opinion about Stiqr is that it has opened up a whole new horizon that I’ve never thought possible: live editing the look of WordPress (or any other kind of website) directly from the browser without the need for coding knowledge. I am absolutely sure that I’ll use this service often in the future.

What do you think of Stiqr? Do you know similar services out there? Please share using the comments below.

Similar MakeUseOf Articles

\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"

URL: http://feedproxy.google.com/~r/Makeuseof/~3/X7l7fwwrXFo/

\"Reblog