
All configuration options for vim are stored in the user’s home directory in a file named .vimrc
Vim is in Insert mode with the use of the a, A, i, I, o, and O commands. Once in Insert mode, the editor will stay in that mode until you press an Esc key. Every other key pressed is directly inserted into the file at the current cursor location. Visual mode happens when you use a v, V, and Ctrl-v commands from Normal mode. As far as I know, bash is the default (with vi-like edit commands) in Terminal as long as work with X.3 and you installed X.3 from scratch. If you updated to X.3 from X.2, then your default is tcsh (remaining for X.2 so that all your settings remain). Vi has two modes, command and insert (really, three if you count replace mode). Command mode is used to navigate, search, and issue other commands. Insert mode is used to enter text. Vi starts in command mode. Vi is an interactive text editor that is display-oriented: the screen of your terminal acts as a window into the file you are editing. Changes you make to the file are reflected in what you see. Using vi you can insert text anywhere in the file very easily. Most of the vi commands move the cursor around in the file. You can move the cursor. In this video you will learn about the vi/VIM editor. If some of the commands don't work just let me know. Since i can't post the commands i'll be posting th.
The script code is below but there are somethings you’ll want to do before setting it up.
You’ll need to create directories for the following: backups, colors, swaps and undo.
Execute this command to set up the directories in the terminal ( The ~ character will set the path to your home directory. ex: /Users/username/ ):
$ cd ~/.vim ; mkdir backups ; mkdir colors ; mkdir swaps; mkdir undo;
This will keep all your backups, swaps and undos in your .vim user directory. Also the colors directory is for installing themes.
Visit vimninjas.com if you would like to download a color scheme. Once you find a color scheme you like, just download it and copy and paste the code into the relevant scheme file and place the file in ~/.vim/colors/
For example if you download the Candy theme, you would name the file candy.vim and place it in the relevant directory described above. Then in your .vimrc config file you would set the theme like so:
Vi Mac Commands Cheat
I've created a github repo with the .vimrc configuration. Please take a look at the repo and download from here.
Checkout or download the git zip and setup the .vimrc file by using the cp command.
$ cd ~/Downloads/MacOSVimConfig-master
$ cp vimrc-example ~/.vimrc
Otherwise you can create your .vimrc file by copying the Raw text from github and pasting the text below. NOTE: While in vim before you paste try doing this command.
:set paste
This should paste the text with the best result. Once the .vimrc file is configured open a new terminal windows and open a file to test out the setup.
$ vim ~/.vimrc
Vi Commands Mac
------------ .vimrc example configuration ------------------
Vi Mac Commands Download
Then paste in these configuration options:
