-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
84 lines (67 loc) · 2.35 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
"----------
" PREAMBLE
"----------
set nocompatible " be iMproved
filetype off " required!
"----------
" VUNDLE
"----------
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vale1410/vim-minizinc'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
call vundle#end()
syntax on
filetype plugin indent on " required!
"----------
" VIM SETTINGS
"----------
set magic " Enable extended regexes
set hlsearch " highlight searches
set incsearch " show the `best match so far' astyped
set ignorecase smartcase " make searches case-insensitive, unless they
" contain upper-case letters
set t_Co=256 " 256 colors terminal
set number " Enable line numbers
set showmatch " show matching parenthesis
set title " Show the filename in the window title bar
set autoindent smartindent " auto/smart indent
set copyindent " copy previous indentation on auto indent
set softtabstop=2 " Tab key results in # spaces
set tabstop=2 " Tab is # spaces
set shiftwidth=2 " The # of spaces for indenting.
set path+=** " recursive file searches
set wildmenu " tab completion
set makeprg=gcc " compile C code
command! MakeTags !ctags -R .
set omnifunc=syntaxcomplete#Complete " Syntax aware code completion
set complete+=kspell
"switch spellcheck languages
let g:myLang = 0
let g:myLangList = [ "nospell", "sv_se", "en_us", "de_de" ]
function! MySpellLang()
"loop through languages
let g:myLang = g:myLang + 1
if g:myLang >= len(g:myLangList) | let g:myLang = 0 | endif
if g:myLang == 0 | set nospell | endif
if g:myLang == 1 | setlocal spell spelllang=de_de | endif
if g:myLang == 2 | setlocal spell spelllang=en_us | endif
echo "language:" g:myLangList[g:myLang]
endf
map <F7> :call MySpellLang()<CR>
imap <F7> <C-o>:call MySpellLang()<CR>
"----------
" SYNTASTIC
"----------
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0