Home Man
Search
Today's Posts
Register

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Vim tips and tricks

Tags
beginners

Login to Reply

 
Thread Tools Search this Thread
# 29  
Old 11-28-2016
Now I have to figure out how to switch from Insertion Mode to Command Mode
# 30  
Old 11-28-2016
Quote:
Originally Posted by Howie Vahedi
Now I have to figure out how to switch from Insertion Mode to Command Mode
It is simple; just hit the escape key.
# 31  
Old 02-02-2017
Just another usefull vim tip, to customize your own skin :

To just view the setting, just use it with no argument :
Code:
:highlight

also shortened as
Code:
:hi

This will display the current settings.

To display the current setting of the Comment class, just enter:
Code:
:hi Comment

For example, if your comment lines appear in a Dark blue and you expect a lightblue instead (0,255,255) or #00ffff try :

Code:
:hi Comment ctermfg=6

You could then set your own settings in your $HOME/.vimrc ... activate :set syntax=on if necessary)

The different classes (Comment, Title, Constant, Special, ...) and much more, are documented at :
Vim documentation: syntax

Just play with the :highlight command , get use to it and enjoy !

Last edited by ctsgnb; 02-02-2017 at 05:54 AM..
# 32  
Old 02-02-2017
Quote:
Originally Posted by ctsgnb
cW:change the Whole line from the current cursor position (same as C )
not quite: The difference is what "word" means. "cw" (or any other command using "w" as a range assignment) will treat special characters as the end of the word, whereas "cW" will treat only whitespace (or line ends) as word delimiters. In the following text:

Code:
typeset foo=bar        # comment

if the cursor is under the "f" of "foo", then "cw" will replace "foo" with what you type afterwards, whereas "cW" will replace "foo=bar". To change the line from the cursor position to the line end use "C".

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
ctsgnb (02-13-2017)
# 33  
Old 02-13-2017
Ok fixed ... Thanks bakunin for noticing this point
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Basic VI tricks cokedude UNIX for Advanced & Expert Users 3 08-05-2011 04:11 PM
Sed Tricks siba.s.nayak UNIX for Dummies Questions & Answers 3 10-20-2009 03:01 AM
Solaris tips and tricks solaris_user Post Here to Contact Site Administrators and Moderators 1 09-24-2009 01:02 PM
need couple of ksh tricks please JamesByars Shell Programming and Scripting 4 02-23-2008 02:07 PM
Set prompt, problems and tricks HybridLogic UNIX for Dummies Questions & Answers 6 09-26-2007 08:05 PM
tar tricks neked UNIX for Advanced & Expert Users 2 08-14-2006 03:14 PM


All times are GMT -4. The time now is 01:49 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password