Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

Vim tips and tricks

Login or Register to Reply

Thread Tools Search this Thread
# 15  
This thread is a little old, I hope I dont have to make a new one for this.

On most systems the arrow keys will give you control of the cursor, however when I was first learning my arrow keys just stopped working in vim. I found the solution somewhere and it was just a simple command to run before using vim every day so i added it to my .profile and forgot about it. Now I am miles away from my work computer so have no way to look it up, so if someone knows what I am talking about and can clarify or at least post the command I think that would make a great addition to this thread. I will try to find it and post it here. If no one beats me to it.

As a new user that almost made me want to give up, I couldn't scroll and so for me there was nothing better than cat.
# 16  
I am a beginner with unix, so may be my question will be very stupid.

I have problem with saving a FORTRAN's code after changing it.
I used the "vim" command to read the code, then use the "SHIFT-I" to insert some new part in the code.
After that I don't know how to save the code.
I tried the command: ":w" but it just write to the code, it can not save the code.
Thanks in advance for helping me.

---------- Post updated at 02:28 AM ---------- Previous update was at 02:02 AM ----------

Could I have another question here?
If I want to copy 19 lines in the fortran code (for example from line 1 to line 19) after using the command "vim" to read the code, what should I do?
Thank so much!
# 17  
@Phamnu :
What you have to understand is :
when in vi or vim you have 2 main mode :
- insertion mode (when you type your code)
- command mode (when you want to tell vi/vim to do some specific actions, line jump, cursor move ...)
With normal bindings, to switch to command mode, press <ESC>
To switch to insert mode, you can use different command (i : insert where your cursor is, I insert at beginning of the line you are on, o, open a line under which you are, O open line above which you are.

a) <ESC> go to command mode
b) 1G go to first line
c) 19yy yank 19 lines including the line your cursor is on
d) nG go on the nth line under which you want to insert the lines
e) p paste the lines previously yanked.
This User Gave Thanks to ctsgnb For This Post:
# 19  
Originally Posted by illgetit
Silly question; are vi and vim one in the same?

Nope. vi = vi - Wikipedia, the free encyclopedia
vim =

vim is of course based on vi but has more features and improvements - like syntax color highlighting. Stands for 'VI iMproved"
# 20  
I don't have vim editor on my system can anyone suggest where can i find it and how to install it.

I have tried downloading few rpm's packages but it isn't working for me.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Basic VI tricks
I found a decent guide of VI basic tricks. This guide does expect you to have a decent understanding of VI. It does not go over very much beginner related. vi Manual... UNIX for Advanced & Expert Users
UNIX for Advanced & Expert Users
Very Importan - Vim Settings - Error while opening a File using vim
I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line...... Solaris
Solaris tips and tricks
What do you think could we open new top topic with tips and tricks and to show to other users some tricks what do we know like dtrace , new virtual server , how to add new users etc. This is only suggestion... Post Here to Contact Site Administrators and Moderators
Post Here to Contact Site Administrators and Moderators

Featured Tech Videos