-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
114 lines (87 loc) · 2.25 KB
/
.vimrc
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
" Kolton Andrus
" .vimrc
syntax enable
colorscheme darkblue
set background=dark
"" Execute Pathogen
execute pathogen#infect()
"" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
" Height of the command bar
set cmdheight=2
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif
"" Rust
set hidden
let g:racer_cmd = "/Users/kolton/.cargo/bin/racer"
let g:racer_experimental_completer = 1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
set ruler
" Autoformat rust files on save
"let g:rustfmt_autosave = 1
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Misc
" Add a bit extra margin to the left
set foldcolumn=1
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
nmap <C-n> :NERDTreeToggle<CR>
" Map ctrl-s to save
nmap <c-s> :w<cr>
imap <c-s> <esc>:w<cr>
" Map ctrl-w to close current buffer
" Window movement prevents this, need to find a better way
"nmap <C-w> :bdelete<cr>
" Map ctrl-q to close the current window
nmap <C-q> :q!<kEnter>
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
"set laststatus=2
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
"nmap <M-j> mz:m+<cr>`z
"nmap <M-k> mz:m-2<cr>`z
"vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
"vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
"
"if has("mac") || has("macunix")
" nmap <D-j> <M-j>
" nmap <D-k> <M-k>
" vmap <D-j> <M-j>
" vmap <D-k> <M-k>
"endif