Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed the text-editor "VIM" on my Ubuntu desktop 12.04 (running as a guest vm on a Win 7 host via VirtualBox). I used the command "sudo apt-get install vim", and the following "recommended additions" came up:

ctags vim-doc vim-scripts

I am still relatively new to Linux and am learning the basic commands, so I have little to no idea what these recommended additions are or if I should download them. I mostly downloaded VIM as a practice for the "apt-get" command.

Also, upon starting VIM up (sudo VIM), I can go into insert mode via pressing 'a' and escape insert mode via pressing 'esc', but beyond that, I don't know how to quit VIM (asides from forcing the terminal to close by manually x'ing out of it) or how to save changes I've made. For example, I have a word doc saved in /home/documents/VMtext.odt Does it make sense to use the command sudo VIM /home/documents/VMtext.odt to edit the word doc through VIM, as opposed to just opening the word doc and editing it directly?

share|improve this question
1  
You shouldn't need to use sudo to open user files with vim. –  Jorge Castro Jun 18 '12 at 21:28
    
Also, Ubuntu is case-sensitive. You cannot run Vim with VIM. You must use vim. –  Eliah Kagan Jun 19 '12 at 23:33
    
Lol- it took me a good 4-5 minutes to figure that out before I started typing it all in lower case. Thanks though! –  Jay Jun 21 '12 at 21:13

3 Answers 3

up vote 3 down vote accepted

Not exactly sure what those extra files are but just install them they could be part of some dependancy. Quickly overview of vim bellow:

To quit INSERT MODE press Esc button.

To save and quit press:

:wq

w for write, q for quit.

To quit without saving changes press:

:q

If vim complains after this command press:

:q!

! is for force quit

This video explains a lot about vim - http://youtu.be/ImK_dHPOTIE

share|improve this answer
    
Thanks a bunch! –  Jay Jun 18 '12 at 20:18

You might consider that "playing around" with vim, instead of going to something more comfortable but less functional (like gedit-notepad clone) may also get you flying sooner. While you may be stuck with gedit, afraid to bother with vim/emacs, later on. Just a personal choice to make.

share|improve this answer

You can ignore them for now if you just want to use the basic functionality of vim.

If you're new to Linux, I'd leave vi/vim alone for now. There's easily 100 different functions you can do... depending on which key combo's you press. To get started using something simpler as an editor, e.g. on Ubuntu you can use gedit which is a bit like Windows notepad.

If you just want to learn more about apt you can find good info here:

http://newbiedoc.sourceforge.net/system/apt-get-intro.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.