-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
62 lines (51 loc) · 1.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
"
" My vimrc.
"
" Use Vim settings
set nocompatible
" Vundle
set runtimepath+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'fatih/vim-go'
Plugin 'wting/rust.vim'
call vundle#end()
" Use sensible tab settings
set tabstop=2
set shiftwidth=2
set expandtab
set smartindent
filetype plugin indent on
" Use sensible search settings
set incsearch
set hlsearch
set ignorecase " Ignore search case unless search contains capitals
set smartcase
" Show line number at the bottom
set ruler
" Show incomplete commands
set history=50
set showcmd
" Turn on colouring
colors desert
syntax enable
" Enable backups but stuff them away
set backup
set backupdir=~/.vim/backup
" Configure the GUI
set guifont=Consolas:h10
set guioptions-=T
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler.
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Use space as the leader
" Redefine frequent actions using the leader
let mapleader = "\<Space>"
vmap <Leader>y "+y
nmap <Leader>p "+p
nnoremap <Leader>w :w<CR>