Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ~/.vimrc
- set nocompatible " be iMproved, required
- " filetype off " required
- " highlighting
- " set relativenumber
- set number
- set ruler
- syntax on
- set background=dark
- set cursorline
- set incsearch
- set hlsearch
- set ignorecase
- set smartcase
- set showmatch
- :highlight search guifg=yellow guibg=darkred
- " tabbing
- set expandtab
- set smarttab
- set smartindent
- set shiftwidth=2
- set tabstop=2
- set softtabstop=2
- " have command-line completion <Tab> (for filenames, help topics, option
- " names) first list the available options and complete the longest common part,
- " then have further <Tab>s cycle through the possibilities:
- set wildmode=list:longest,full
- " folding settings
- set foldmethod=indent
- set foldnestmax=10
- set nofoldenable
- set foldlevel=1
- " All of your Plugins must be added before the following line
- filetype plugin indent on " required
- let g:solarized_termcolors=256
- " Strip trailing whitespace
- function! <SID>StripTrailingWhitespaces()
- " Preparation: save last search, and cursor position.
- let _s=@/
- let l = line(".")
- let c = col(".")
- " Do the business:
- %s/\s\+$//e
- " Clean up: restore previous search history, and cursor position
- let @/=_s
- call cursor(l, c)
- endfunction
- autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
Add Comment
Please, Sign In to add comment