You are not logged in.
Pages: 1
I've recently been using VIM via with the GTK gui(gvim) and I fell in love with the editor, but I'd also like to use it in console mode instead of nano. The issues I am having is I do not know the keybindings in order to save ect. I'm use to M$ style keybindings . It's something like Ctrl+X+S? Something like that xD. Odd keybindings. Thanks for my very newbish question
Offline
Welcome to vim! Here are some great resources:
http://vi-improved.org/tutorial.php
http://www.gentoo.org/doc/en/vi-guide.xml
http://amix.dk/vim/vimrc.html
good luck!
Offline
to save the file go into command mode (hit escape) and type :wq
: means this is a command
w means write
q means quit
also you can enter 'vim' in a console and type :help <keyword>
Google for vim tutorial:
google:vim tutorial
Offline
Thanks for the quick replies guys time to start reading... mauha.
Offline
a good way to get started with vim is to run through the interactive tutorial that comes with the package:
$ vimtutor
All of your mips are belong to us!!
Offline
Another usefull tool that comes along with vim, once you learn it, is vimdiff. Very useful for comparing and editing .pacnew files.
Offline
I'll second the vimtutor suggestion. A few minutes with it and you'll be up and running before you know it.
oz
Offline
Vimtutor is excellent, as is this reference chart. I'd recommend making sure you know the movement keys, how to save (:w) and quit (:q), then you can learn the rest at your pace. Undo (u) is handy too.
Offline
If you need to save a file in command mode (press ESC to get to command mode) just type ZZ to save and exit. A little quicker than :wq
---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare
Offline
(insert some witty remark about how vim pwns emacs)
Offline
I made this a while back and some people have found it helpful:
Offline
Just a nitpick:
: means this is a command
: means it is an Ex mode command. Normal mode commands are not colon prefixed, but are still "commands"
Offline
ofc, unless you learn vim _well_ there is no reason you should use it when there are other, better editors for you out there.
This is important, as if you use vim for 2 years while not really knowing how to use it efficiently youd probable be more efficient using *insert notepad clone here*
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
hahaha. Vim in insert mode is a notepad clone. So why don't you take the jump and learn the rest?
Offline
hahaha. Vim in insert mode is a notepad clone. So why don't you take the jump and learn the rest?
My point was that if you are used to keycombinations like ctrl+c and ctrl+v, ctrl+z, ctrl+s and the like vim isn't another notepad clone since there are different ways to handle this functionality in vim. If you go download kwrite or scite you still have these shortcuts and can work just like you did when you was in good 'ol windows.
that might be more effective for you if you never learn to use vim good. There's nothing wrong with that, so don't go saying vim in 'insert mode' is the same as a notepad clone. It's not.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
ofc, unless you learn vim _well_ there is no reason you should use it when there are other, better editors for you out there.
What better editors?
Offline
test1000 wrote:ofc, unless you learn vim _well_ there is no reason you should use it when there are other, better editors for you out there.
What better editors?
Emacs, but you are out of luck with MS-key-bindings there too
Offline
Other than Escape-Meta-Alt-Control-Shift, I mean.
Offline
test1000 wrote:ofc, unless you learn vim _well_ there is no reason you should use it when there are other, better editors for you out there.
What better editors?
i meant better as in 'better if you are used to windows keycombination and typical notepad-like interface and don't want to spend the time learning vim good enough so as to obliverate the necessity for previously mentioned like text-editor'
then better would be: scite kwrite kate ...
basically every editor except vim, emacs and nano _almost_ i must make clear.
but i thought this was obvious. ach. i shall now construct everything i say so as to not leave a shred of possible misunderstanding in the air.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
My point was that if you are used to keycombinations like ctrl+c and ctrl+v, ctrl+z, ctrl+s and the like vim isn't another notepad clone since there are different ways to handle this functionality in vim. If you go download kwrite or scite you still have these shortcuts and can work just like you did when you was in good 'ol windows.
I have to use Windows at work. When I installed Vim, ctrl+c/x/v combos were working out-of-the-box.
When I look at the original vimrc, there was a line saying 'behave mswin', and so I'm guessing that has something to do with it.
Therefore, you can have windows combos and the power of Vim.
Offline
Therefore, you can have windows combos and the power of Vim.
yep, you just have to figure out how to get it to behave like that first, oh, and realise that it is even possible so you know that you can implement that functionality somehow... ach.
but it's cool, now I know atleast.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
arooaroo wrote:Therefore, you can have windows combos and the power of Vim.
yep, you just have to figure out how to get it to behave like that first, oh, and realise that it is even possible so you know that you can implement that functionality somehow... ach.
but it's cool, now I know atleast.
As I mentioned, if you are installing Vim on Windows, then this Windows-like behaviour is there straight-away with a fresh installation. You don't need to hunt for the vim settings to enable it or anything - it's just enabled by default.
It's obviously more effort to disable this default behaviour, in fact.
Offline
what are you talking about? I thought we were talking about linux here.. isn't this a linux forum.. the newbie corner, am i delusional?
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
source $VIMRUNTIME/mswin.vim
behave mswin
bamf. mswin.vim script adds all the fun shortcuts, while 'behave' changes the mouse settings.
Offline
what are you talking about? I thought we were talking about linux here.. isn't this a linux forum.. the newbie corner, am i delusional?
I was tired! I managed think that the discussion was verging on notepad replacement territory, which is why there was all the ctrl-x/c/v malarky.
Anyway...
Offline
Pages: 1