forked from CINF/PyExpLabSys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
93 lines (74 loc) · 3.19 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
" vimrc created by alexander krabbe
colorscheme dichromatic "colour blind colourscheme. normal: badwolf
" plugins for pluginstall
" call plug#begin('~/.vim/plugged')
"Plug 'itchyny/lightline.vim'
" call plug#end()
" Custom Silent command that will call redraw
command! -nargs=+ Silent
\ execute 'silent ! <args>'
\ | redraw!
" Easy compiling latex files from vim
":map <F5> :Silent pdflatex % && open -a Preview && open -a iTerm
":map <F6> :Silent pdflatex % && open -a zathura && open -a iTerm
" Python programming
" enable all Python syntax highlighting features
let python_highlight_all = 1
syntax on " syntax highlighing
filetype on " try to detect filetypes
filetype plugin indent on " enable loading indent file for filetype
set number " Display line numbers
set numberwidth=1 " using only 1 column (and 1 space) while possible
set cursorline " highlights current line for easier navigation
set background=dark " We are using dark background in vim
set title " show title in console title bar
set wildmenu " Menu completion in command mode on <Tab>
set wildmode=full " <Tab> cycles between all matching choices.
set showcmd
set scrolloff=7
set colorcolumn=105
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
set autoindent
set smartindent
set ruler
set hidden
set nolazyredraw
set showmatch
set encoding=utf8
""" Searching and Patterns
set ignorecase " Default to using case insensitive searches,
set smartcase " unless uppercase letters are used in the regex.
set smarttab " Handle tabs more intelligently
set hlsearch " Highlight searches by default.
set incsearch " Incrementally search while typing a /regex
" Flash screen instead of beep sound
set visualbell
" Trying to include a new colour scheme for channel file for QMS channel list at dtu
au BufRead,BufNewFile *.txt set filetype=channel
" me copying a statusline from the interwebs: https://dustri.org/b/lightweight-and-sexy-status-bar-in-vim.html
set laststatus=2
set statusline=
set statusline+=%#DiffAdd#%{(mode()=='n')?'\ \ NORMAL\ ':''}
set statusline+=%#DiffChange#%{(mode()=='i')?'\ \ INSERT\ ':''}
set statusline+=%#DiffDelete#%{(mode()=='r')?'\ \ RPLACE\ ':''}
set statusline+=%#Cursor#%{(mode()=='v')?'\ \ VISUAL\ ':''}
set statusline+=\ %n\ " buffer number
set statusline+=%#Visual# " colour
set statusline+=%{&paste?'\ PASTE\ ':''}
set statusline+=%{&spell?'\ SPELL\ ':''}
set statusline+=%#CursorIM# " colour
set statusline+=%R " readonly flag
set statusline+=%M " modified [+] flag
set statusline+=%#Cursor# " colour
set statusline+=%#CursorLine# " colour
set statusline+=\ %t\ " short file name
set statusline+=%= " right align
set statusline+=%#CursorLine# " colour
set statusline+=\ %Y\ " file type
set statusline+=%#CursorIM# " colour
set statusline+=\ %3l:%-2c\ " line + column
set statusline+=%#Cursor# " colour
set statusline+=\ %3p%%\ " percentage