-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
151 lines (122 loc) · 4 KB
/
vimrc
File metadata and controls
151 lines (122 loc) · 4 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
" Vundle
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
" Run :PluginInstall
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'nvie/vim-flake8'
Plugin 'Yggdroot/indentLine'
Plugin 'pedrohdz/vim-yaml-folds'
Plugin 'rishi-opensource/vim-claude-code'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set guifont=Monospace\ 10
set encoding=utf-8
" Tabs are evil
set tabstop=3
set expandtab
set shiftwidth=3
" Turn off visual beep
set vb t_vb=
" Cut and paste support
vnoremap <C-X> "+x
vnoremap <C-C> "+Y
vnoremap <C-V> "+gp
" VHDL Tools, \s = whitespace, \S = non whitespace
command -range Inst <line1>,<line2> s/\(\S\+\)\(\s\+\):.*/\1\2 => \1,/
command -range Sig <line1>,<line2> s/\(\S\+\)\(\s\+\):\(\s\+\)\(\S\+\)\(\s\+\)\(\S\+\)/signal \1\2:\3\6/
command -range -nargs=1 InstInd <line1>,<line2> s/=>/\( \)\{<args>\}=>/
command -range Sysc <line1>,<line2> s/\(\s\+\)\(\S\+\).*/\1\2("\2"),/
command -range Debug <line1>,<line2> s/\(\s\+\)\(\S\+\)\(\s\+\)\(\S\+\)\(\s\+\):.*/ attribute mark_debug of \4\5: signal is "true";/
command -range Debugp <line1>,<line2> s/\(\s\+\)\(\S\+\)\(\s\+\):.*/ attribute mark_debug of \2\3: signal is "true";/
command Zoom set guifont=*
" Python
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix |
" \ set textwidth=79 |
let python_highlight_all=1
syntax on
autocmd BufWritePre * %s/\s\+$//e
" Find bad whitespace
"au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" Shortcuts
cmap ensp :set spell spelllang=en_ca
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
set foldmethod=indent
set foldlevel=99
let g:pymode_folding = 1
nnoremap <space> za
" Hide some files
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
let g:NERDTreeDirArrows=0
let g:NERDTreeDirArrowExpandable='+'
let g:NERDTreeDirArrowCollapsible='-'
" Set working directory
autocmd vimenter * silent! lcd %:p:h
autocmd vimenter * NERDTree
"AI interface
let g:vim_ai_providers = {
\ 'default': {
\ 'provider': 'google',
\ 'options': {
\ 'model': 'gemini-3-pro-preview',
\ 'endpoint_url': 'https://generativelanguage.googleapis.com/v1beta/models',
\ },
\ },
\ }
" Find bad whitespace
"au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" Color schemes
if has('gui_running')
set background=dark
colorscheme solarized
set lines=55 columns=200
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
else
colorscheme zenburn
endif
set printoptions+=header:0
set printexpr=PrintFile(v:fname_in)
function PrintFile(fname)
call system("kprinter " . a:fname)
call delete(a:fname)
return v:shell_error
endfunc
" Switch betweens schemes with F5
call togglebg#map("<F5>")
set directory=~/.vim/cache/
set backupdir=~/.vim/backup/
" Syntastic settings
let g:syntastic_mode_map = { 'passive_filetypes': ['python'] }
let g:vim_ai_roles_config_file = expand("~/.vim/vim-ai.roles.ini")