-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
72 lines (56 loc) · 1.9 KB
/
Copy pathvimrc
File metadata and controls
72 lines (56 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
" Use vim settings, rather then vi settings (much better!)
" This must be first, because it changes other options as a side effect.
set nocompatible
" Load pathogen
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
" Enable syntax highlighting
syntax on
set background=dark
" Enable line numbering
set number
set numberwidth=5
" Set up our tabs
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
" Togge paste mode to prevent indenting when pasting
set pastetoggle=<F2>
" We want our encoding to be utf-8
set encoding=utf-8 nobomb
" Allow backspace in insert mode
set backspace=indent,eol,start
" Store lots of :cmdline history
set history=1000
" Enable wildmenu
set wildmenu
" 1st tab: complete longest common command, 2nd tab: show all completions
set wildmode=list:longest,full
set showmode " always show what mode we're currently editing in
set ruler " Always show current positions along the bottom
set showmatch " Show matching brackets
set nowrap " Turn off line wrapping
set ignorecase " Case insensitive matching
set smartcase " Smart case matching
set incsearch " Incremential search
set showcmd " Show (partial) command in the status line
set nobackup " We don't want a backup file
set noswapfile " No need for a swap file
set hidden " Change buffer without saving
set hlsearch " Highlight search terms
set incsearch " Show search matches as you type
set scrolloff=8 " Start scrolling 8 lines from top/bottom margins
set sidescrolloff=15 " Start scrolling 15 lines from left/right margins
set sidescroll=1
nnoremap ; :
"calls sudo and asks for password if necessary
cmap w!! %!sudo tee > /dev/null %
if has("autocmd")
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
endif