-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
122 lines (85 loc) · 2.38 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
115
116
117
118
119
120
121
122
" ckunte's .vimrc file
" Reload .vimrc automatically
autocmd! bufwritepost .vimrc source %
" Better copy and paste
set pastetoggle=<F2>
set clipboard=unnamed
" Indent right with > and left with <
vnoremap < <gv
vnoremap > >gv
"enable syntax highlighting
syntax on
" Optimise for fast terminal connections
set ttyfast
" Do not add empty lines at the end of files
set binary noeol
" Respect modeline in files
set modeline modelines=4
" Enable autoindent
set autoindent
" Make tab stops as wide as 4 spaces
set tabstop=4 softtabstop=4 shiftwidth=4 shiftround expandtab
" Get backspace to work
set backspace=indent,eol,start
" Highlight searches
set hlsearch
" Ignore case searches
set ignorecase
" Highlight dynamically as pattern is typed
set incsearch
" Always allow status line
set laststatus=2
" Enable mouse in all modes
set mouse=a
" Do not reset cursor to the start if line when moving around
set nostartofline
" Show the cursor position
set ruler
" Show current mode
set showmode
" Show filename in the window titlebar
set title
" Show the (partial) command as it is being typed
set showcmd
" Start scrolling 3 lines before the horizontal window border
set scrolloff=3
" Save a file as root (,W)
"noremap <leader>W :w !sudo tee % > /dev/null<CR>
" Enable line wrap, and do not break word in-between
set wrap linebreak nolist
" Spelling check
setlocal spell
set spelllang=en_gb
" Correct misspelled words on the fly with Ctrl+L
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_gb
" Word completion
set complete+=kspell
" Abbreviations
abbr <expr> ds strftime('%Y-%m-%d %H:%M')
abbr kr Kind regards,<cr>Chetan
" Disable python2 support in nvim
let g:loaded_python_provider = 0
" Python3 path for neovim to use
"let g:python3_host_prog = '/user/bin/python3'
call plug#begin('~/.vim/plugged')
" UltiSnips for snippets
Plug 'sirver/ultisnips'
" Auto pairing
Plug 'jiangmiao/auto-pairs'
" Quoting / Parenthesizing made simple
Plug 'tpope/vim-surround'
" Snippets
Plug 'ckunte/vimsnips'
" Lightline
Plug 'itchyny/lightline.vim'
" colour scheme
Plug 'patstockwell/vim-monokai-tasty'
call plug#end()
" UltiSnips triggers
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
" Color schemes
colorscheme vim-monokai-tasty
let g:lightline = {'colorscheme': 'monokai_tasty',}