Monday, October 14, 2013

Setting explanation

If you don't like new setting, you can choose what to use.

1. set nobackup
It is not going to create back up file with extension'.swp'.

When you open your file on matrix, sometimes it might lock you to use it.
This is because you have a back up file.
When you change something opening this file on another screen
or whenever it crashes, it automatically creates back up file.
nobackup will prevent to create it.

2. set nocompatible
It is to ward off unexpected things that you have made.


3. set hlsearch
    set incsearch
When you search words/strings while using vi/vim,
it will highlight those words/strings.


4.set ignorecase 
Again, when you search something, it will ignore cases.
ex) If you search for 'hello', it will also look for 'Hello', 'HELLO', etc.


5.set softtabstop=2 
It will insert 2 spaces instead of tab, when you press tab key.


6.set ts=2
It sets your tab size 2.


7. set shiftwidth=2 
    set expandtab

It will display any tab key as 2 spaces.

**5,6,7 look similar, but their purposes are different.
You might need those things to align clearly.



8. set ruler 
It will show your cursor position (col, row) at the right bottom.


9. set scrolloff=20 
It will move scroll left/right when your cursor is 20 positions before the edge of the left/right screen.


10. set sidescrolloff=20 
It will scroll down or up when your cursor is 20 lines before the edge of the bottom/top screen.


set wrap set backspace=2 colorscheme desert syntax on hi WarningMsg ctermfg=15 ctermbg=12 guifg=White guibg=Red gui=NONE

★syntax on : will change your code colorful, and more readable.






No comments:

Post a Comment