User Tools

Site Tools


vim-a-real-editor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vim-a-real-editor [2017/02/21 14:13]
adam92 created
vim-a-real-editor [2017/02/21 14:17] (current)
adam92
Line 24: Line 24:
 Other popular vi clones are elvis, viper, and calvin. They each have a different look and feel. You might find that one of them suits you more than vim. Other popular vi clones are elvis, viper, and calvin. They each have a different look and feel. You might find that one of them suits you more than vim.
 ===== Using Vim ===== ===== Using Vim =====
-=== = The Vim Tutor ====+==== The Vim Tutor ====
  
 The best way to become familiar with Vim is by running the command vimtutor from the command line. This opens a 25-30 minute interactive vim tutorial. It is very thorough and will give you a good understanding of the basics of using vim. The best way to become familiar with Vim is by running the command vimtutor from the command line. This opens a 25-30 minute interactive vim tutorial. It is very thorough and will give you a good understanding of the basics of using vim.
Line 32: Line 32:
 Many times while programming it is helpful to open more than one file at once. There are many ways to do this in vim. The simplest way is to split the screen. To do this you can use the following commands: Many times while programming it is helpful to open more than one file at once. There are many ways to do this in vim. The simplest way is to split the screen. To do this you can use the following commands:
  
-::split: Split the screen horizontally. ::vsplit: Split the screen vertically.+  split: Split the screen horizontally.  
 +  vsplit: Split the screen vertically.
  
 Both of these commands will give you a new buffer on the screen and allow you to still see the old one. You can then use :edit to open a new file in the buffer. I find this very handy for watching multiple parts of a file or viewing a header and the source file at the same time. Both of these commands will give you a new buffer on the screen and allow you to still see the old one. You can then use :edit to open a new file in the buffer. I find this very handy for watching multiple parts of a file or viewing a header and the source file at the same time.
Line 39: Line 40:
  
 Another helpful method for using multiple buffers is to use the MiniBufExplorer plugin. Another helpful method for using multiple buffers is to use the MiniBufExplorer plugin.
-==== Folding= ===+==== Folding ====
  
 Another handy trick when programming is to be able to fold your code. Very few programs can be contained in one screen of text, but folding helps more of your program to fit on the screen at a time. A fold will collapse a set of lines into one line. To make it work the best you will need to add this line to your $HOME/.vimrc file: Another handy trick when programming is to be able to fold your code. Very few programs can be contained in one screen of text, but folding helps more of your program to fit on the screen at a time. A fold will collapse a set of lines into one line. To make it work the best you will need to add this line to your $HOME/.vimrc file:
vim-a-real-editor.txt · Last modified: 2017/02/21 14:17 by adam92