VIM: tabs are replaced with spaces.
This commit is contained in:
24
vim/vimrc
24
vim/vimrc
@@ -15,8 +15,10 @@ set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
|||||||
set history=50 " keep 50 lines of command line history
|
set history=50 " keep 50 lines of command line history
|
||||||
set ruler " show the cursor position all the time
|
set ruler " show the cursor position all the time
|
||||||
set tabstop=4 " make tabes to be equal to 4 space chars.
|
set tabstop=4 " make tabes to be equal to 4 space chars.
|
||||||
|
set shiftwidth=4 " for indentation shift by 4 chars.
|
||||||
set expandtab " this is for MG files.
|
set expandtab " this is for MG files.
|
||||||
set shiftwidth=4 " for shifting by 4 when pressing tab.
|
set softtabstop=4 " insert/<BS> deletes 4 space chars.
|
||||||
|
set smarttab " insert/<BS> space in front of line instead of tab.
|
||||||
set fileformat=unix " line ending is unix
|
set fileformat=unix " line ending is unix
|
||||||
set textwidth=80 " 80 char text
|
set textwidth=80 " 80 char text
|
||||||
let g:netrw_preview = 1 " netrw open window to the right
|
let g:netrw_preview = 1 " netrw open window to the right
|
||||||
@@ -56,8 +58,8 @@ if exists('&hidden')
|
|||||||
set hidden
|
set hidden
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Instead of failing a command because of unsaved changes, instead raise a
|
" Instead of failing a command because of unsaved changes, raise a dialogue
|
||||||
" dialogue asking if you wish to save changed files.
|
" asking if you wish to save changed files.
|
||||||
if exists('&confirm')
|
if exists('&confirm')
|
||||||
set confirm
|
set confirm
|
||||||
endif
|
endif
|
||||||
@@ -87,9 +89,8 @@ if exists('&modeline')
|
|||||||
set modeline
|
set modeline
|
||||||
set modelines=10
|
set modelines=10
|
||||||
endif
|
endif
|
||||||
"
|
|
||||||
" Set fold method if supported
|
" Set fold method if supported
|
||||||
"
|
|
||||||
if has('folding')
|
if has('folding')
|
||||||
set nofoldenable
|
set nofoldenable
|
||||||
set foldmethod=indent "fold based on indent
|
set foldmethod=indent "fold based on indent
|
||||||
@@ -102,9 +103,18 @@ if has('folding')
|
|||||||
autocmd FileType cpp setlocal foldmethod=syntax
|
autocmd FileType cpp setlocal foldmethod=syntax
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
"
|
|
||||||
|
" Unset expandtab for make files in any case.
|
||||||
|
if has('autocmd')
|
||||||
|
autocmd FileType make setlocal noexpandtab
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Set expandtab for python files in any case.
|
||||||
|
if has('autocmd')
|
||||||
|
autocmd FileType python setlocal expandtab
|
||||||
|
endif
|
||||||
|
|
||||||
" P4
|
" P4
|
||||||
"
|
|
||||||
command! -nargs=* PFedit :!p4 edit <args> %
|
command! -nargs=* PFedit :!p4 edit <args> %
|
||||||
command! -nargs=* PFrevert :!p4 revert <args> %
|
command! -nargs=* PFrevert :!p4 revert <args> %
|
||||||
command! -nargs=* PFdiff :!p4 diff <args> %
|
command! -nargs=* PFdiff :!p4 diff <args> %
|
||||||
|
|||||||
Reference in New Issue
Block a user