3

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?

3
  • 1
    You shouldn't need to use sudo to open user files with vim. Jun 18, 2012 at 21:28
  • Also, Ubuntu is case-sensitive. You cannot run Vim with VIM. You must use vim. Jun 19, 2012 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, 2012 at 21:13

3 Answers 3

3

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

0
1

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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .