forked from pvrego/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
92 lines (78 loc) · 3.06 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
if has('vim_starting')
set nocompatible " Disable vi-compatibility
endif
" Load plugins
source ~/.vim/plugins.vim
filetype plugin indent on
" Enable syntax highligting
syntax on
source ~/.vim/appearance.vim
set textwidth=80
set autoindent
set autoread " reload files when changed on disk
set backspace=2 " fix broken backspace in some setups
set backupcopy=yes " see :help crontab
"set clipboard=unnamed " yank and paste with the system clipboard
set cursorline " highlight current line
"set encoding=utf-8 " Necessary to show unicode glyphs
set expandtab " convert tab char to spaces
set formatoptions=alw2qt " automatically reflow paragraphs to line width upon change
set lbr " break lines between words
set hlsearch " highlight search matches
set ignorecase " case-insensitive search
set incsearch " search as you type
set laststatus=2 " always show the statusline
set list " enable rendering of invisible characters
set listchars=tab:▸\ ,eol:¬ " Use symbols for tab and end-of-line
set number " set linenumbering ON as default
set relativenumber " set relative linenumbering ON as default
set pastetoggle=<F2> " toggle paste mode
set ruler " Enable bottom ruler
set scrolloff=3 " show context above-below cursorline
set shiftwidth=4 " width for autoindents
"set showcmd
set smartcase " case-sensitive search if any caps
set softtabstop=4 " makes the tab key indent by four spaces
set splitright " new vertical splits on the right side
set tabstop=4 " a tab is 4 characters wide
set wildmenu " show a navigable menu for tab completion
set wildmode=longest,list,full
" enable basic mouse behavior
set mouse=a
if !has('nvim')
if exists('$TMUX') " support resizing in tmux
set ttymouse=xterm2
endif
endif
" fix cursor in tmux
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
" Dictionary word completion using Ctrl-x Ctrl-k
" File from wordlist- (debian) or word- (arch) package
set dictionary+=/usr/share/dict/words
" Define other file types
autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino
autocmd! BufNewFile,BufRead *.ino setlocal ft=arduino
autocmd! BufNewFile,BufRead *.cuh setlocal ft=cuda
source ~/.vim/keybinds.vim
" check current folder and all parent folders for tags files
set tags=tags;/
" specify mutt aliases path, autocomplete aliases with @@ in insert mode
let g:mutt_aliases_file = '~/.mutt/aliases'
" toggle autoformatting of text
"nnoremap <leader>f :exe 'set fo'.(&fo=~'a'?'-':'+').'=a'<CR>
" enable spell checking by default for certain file types
autocmd FileType tex,md,rst,mail :setlocal spell spelllang=en_us
"
" customize what is concealed in LaTeX documents:
" a = conceal accents/ligatures
" d = conceal delimiters
" g = conceal Greek
" m = conceal math symbols
" s = conceal superscripts/subscripts
let g:tex_conceal="agm"