mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 11:19:22 +01:00
vimrc: back to spaces ❤️
542c4109eb
has bothered me enough, I just
cannot stand the tabs messing up everything.
I wouldn't have needed to :retab this, but I wanted to!
This commit is contained in:
parent
4061d3daa2
commit
f87da95ac1
60
rc/vimrc
60
rc/vimrc
@ -4,32 +4,32 @@ set nocompatible
|
|||||||
" Show syntax colours
|
" Show syntax colours
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
set showcmd " Show (partial) command in status line.
|
set showcmd " Show (partial) command in status line.
|
||||||
set showmatch " Show matching brackets.
|
set showmatch " Show matching brackets.
|
||||||
set ignorecase " Do case insensitive matching
|
set ignorecase " Do case insensitive matching
|
||||||
set smartcase " Do smart case matching
|
set smartcase " Do smart case matching
|
||||||
"set incsearch " Incremental search
|
"set incsearch " Incremental search
|
||||||
set autowrite " Automatically save before commands like :next and :make
|
set autowrite " Automatically save before commands like :next and :make
|
||||||
set hidden " Hide buffers when they are abandoned
|
set hidden " Hide buffers when they are abandoned
|
||||||
"set mouse=a " Enable mouse usage (all modes)
|
"set mouse=a " Enable mouse usage (all modes)
|
||||||
|
|
||||||
" Source a global configuration file if available
|
" Source a global configuration file if available
|
||||||
if filereadable("/etc/vim/vimrc.local")
|
if filereadable("/etc/vim/vimrc.local")
|
||||||
source /etc/vim/vimrc.local
|
source /etc/vim/vimrc.local
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set number " Show line numbers.
|
set number " Show line numbers.
|
||||||
|
|
||||||
set ruler " Show the line and column number of the cursor position,
|
set ruler " Show the line and column number of the cursor position,
|
||||||
" separated by a comma.
|
" separated by a comma.
|
||||||
|
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
||||||
"Use modelines!
|
"Use modelines!
|
||||||
set modeline
|
set modeline
|
||||||
set tabstop=4 "four spaces is likely a tab
|
set tabstop=4 "four spaces is likely a tab
|
||||||
"set shiftwidth=4
|
"set shiftwidth=4
|
||||||
set noexpandtab
|
set expandtab
|
||||||
set autoindent
|
set autoindent
|
||||||
|
|
||||||
" Longer history
|
" Longer history
|
||||||
@ -48,7 +48,7 @@ set visualbell
|
|||||||
|
|
||||||
" gvim has light background
|
" gvim has light background
|
||||||
if has('gui_running')
|
if has('gui_running')
|
||||||
set background=light
|
set background=light
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Show hidden characters via
|
" Show hidden characters via
|
||||||
@ -71,24 +71,24 @@ filetype plugin indent on
|
|||||||
|
|
||||||
" Return to last edit position when opening files (You want this!)
|
" Return to last edit position when opening files (You want this!)
|
||||||
autocmd BufReadPost *
|
autocmd BufReadPost *
|
||||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||||
\ exe "normal! g`\"" |
|
\ exe "normal! g`\"" |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" dos2unix ^M copied from http://stackoverflow.com/a/5361702/1675649
|
" dos2unix ^M copied from http://stackoverflow.com/a/5361702/1675649
|
||||||
fun! Dos2unixFunction()
|
fun! Dos2unixFunction()
|
||||||
let _s=@/
|
let _s=@/
|
||||||
let l = line(".")
|
let l = line(".")
|
||||||
let c = col(".")
|
let c = col(".")
|
||||||
try
|
try
|
||||||
set ff=unix
|
set ff=unix
|
||||||
w!
|
w!
|
||||||
"%s/\%x0d$//e
|
"%s/\%x0d$//e
|
||||||
catch /E32:/
|
catch /E32:/
|
||||||
echo "Sorry, the file is not saved."
|
echo "Sorry, the file is not saved."
|
||||||
endtry
|
endtry
|
||||||
let @/=_s
|
let @/=_s
|
||||||
call cursor(l, c)
|
call cursor(l, c)
|
||||||
endfun
|
endfun
|
||||||
com! Dos2Unix keepjumps call Dos2unixFunction()
|
com! Dos2Unix keepjumps call Dos2unixFunction()
|
||||||
au BufReadPost * keepjumps call Dos2unixFunction()
|
au BufReadPost * keepjumps call Dos2unixFunction()
|
||||||
|
Loading…
Reference in New Issue
Block a user