-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
63 lines (56 loc) · 2.8 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
syntax on " Turn on vim's syntax highlighting
filetype plugin indent on " Enable file type detection
set autoindent
set backspace=2 " Make backspace work like you'd expect it to
set cursorline " Highlight the current line
set encoding=utf-8 " Use UTF-8 internally
set expandtab " Tabs are spaces
set fileencoding=utf-8 " The encoding written to file
set fileformat=unix " That LF life, son
set hlsearch " Highlight searches
set ignorecase " Ignore case when searching
set incsearch " start searching when you type the first character of the search string
set laststatus=2 " Always show the status line, also needed for powerline
set linebreak " Don't break break lines at the window width -- causes some words to split across two lines
set list " Displays whitespace
set listchars=eol:¬ " Set end of line character
set noerrorbells " Silence!
set nomodeline " This option will simply turn off modeline parsing altogether
set number " Show line numbers all of the times
set scrolloff=3 " More space around cursor when scrolling
set shiftwidth=2 " Control how many columns text is indented with the reindent operations
set smartcase " Pay attention if you put caps in your search term
set softtabstop=2 " Control how many columns vim uses when you hit tab in insert mode
set splitbelow " Open new panes below
set splitright " Open new panes right
set tabstop=2 " How many columns a tab counts for
" set textwidth=80 " Let's try a textwidth (again)
set ttimeoutlen=50 " No delay after hitting ESC
set novisualbell " Silence!
set wrap " Lines longer than width of the window will wrap
" backups
set backupdir=~/.vim/backup/ " Move backup files to /backup/
set directory=~/.vim/backup/ " Move swp files to /backup/
" commands
command WQ wq
command Wq wq
command W w
command Q q
command Strip %s/\s\+$// " `:Strip` will kill errant whitespace
" mappings
map q <Nop> " No more recording
map Q <Nop> " No more Ex mode
" ctrlp
let g:ctrlp_custom_ignore = {
\ 'dir': 'node_modules\|.sass-cache\|vendor$'
\ }
" colours
colorscheme hybrid " Use the `hybrid` colourscheme
" plugins
call plug#begin('~/.vim/plugins')
Plug 'kien/ctrlp.vim'
Plug 'scrooloose/syntastic'
Plug 'itchyny/lightline.vim'
Plug 'itchyny/vim-cursorword'
Plug 'tpope/vim-commentary'
call plug#end()