#+TITLE: VIM

* Useful commands to remember

** Line numbering
Toggle line numbering with the following commands

#+BEGIN_SRC vim
:set number
:set nonumber
#+END_SRC

** Ex Commands

- @: :: repeat last command
- :{range}t{address} :: copy range of lines to line below specified address
- :{range}m{address} :: move range of lines to line below specified address

* HELP

** Generic help

Simply type ~:help~ or ~F1~ key to get into vims generic help.

This has lots of good information including how to jump in and out of files.

** Jump in and out of files

~CTRL - ]~ will jump into a topic that is tagged (between bars)
~CTRL - O~ or ~CTRL -T~ will jump back.

** Specific help

To get help on a specific topic

~:help topic~


#+TITLE: VIM

* Useful commands to remember

** Line numbering
Toggle line numbering with the following commands

#+BEGIN_SRC vim
:set number
:set nonumber
#+END_SRC

** Ex Commands

- @: :: repeat last command
- :{range}t{address} :: copy range of lines to line below specified address
- :{range}m{address} :: move range of lines to line below specified address

* HELP

** Generic help

Simply type ~:help~ or ~F1~ key to get into vims generic help.

This has lots of good information including how to jump in and out of files.

** Jump in and out of files

~CTRL - ]~ will jump into a topic that is tagged (between bars)
~CTRL - O~ or ~CTRL -T~ will jump back.

** Specific help

To get help on a specific topic

~:help topic~

* Vimrc and alternative configurations
All configutations are stored in a ~.vimrc~ file. This file is loaded
by default when you launch vim. Howerver vim can be launced with an
alternative configuration file using the ~-u~ switch.

This can be useful for things such as:
- playing vimgolf without amending your vim configuration
- for testing out new configurations
- for using a special configuration for a specialised task
- for vim / vimscript learning in a safe enviroment

To launch vim you a configuration file called ~my_vim_config~ in your
home directory you would enter the command:

#+BEGIN_SRC shell
vim -u ~/my_vim_config
#+END_SRC

Add section on launching a different vim configuration script.
Add section on launching a different vim configuration script.
