vimrc's I have known...
I really need to come up with a standard, this is hackery
RPi5
execute pathogen#infect()
syntax on
" tagbar
nmap <F8> :TagbarToggle<CR>
let g:tagbar_type_swift = {
\ 'ctagstype': 'swift',
\ 'kinds' : [
\ 'n:Enums',
\ 't:Typealiases',
\ 'p:Protocols',
\ 'P:Protocols',
\ 's:Structs',
\ 'c:Classes',
\ 'f:Functions',
\ 'v:Variables',
\ 'e:Extensions'
\ ],
\ 'sort' : 0
\ }
"keep the defaults
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
set nocompatible
set statusline=\ %F%m%r%h%w\ %=%({%{&ff}\|%{(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\")}%k\|%Y}%)\ %L\ %([%l,%v][%p%%]\ %)
set laststatus=2
set tabstop=4
set softtabstop=4
set textwidth=132
set autoindent
"set encoding=utf-8
set noexpandtab
set shiftwidth=4
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
set showcmd
set showmatch
set sidescroll=1
set smartcase
set incsearch
set autowrite
set hidden
set noswapfile
set hlsearch
set nowrap
set exrc
set background=dark
"set autoread " I wanna know if the file changed under me
"set nowrapscan
set printfont=courier:h8
" better colours for vimdiff
colorscheme wildtim
" ycm semantic hl
"let g:ycm_enable_inlay_hints=1
let g:ycm_confirm_extra_conf=0
"let g:ycm_enable_semantic_highlighting=1
"verilator
let g:ale_verilog_verilator_options='--lint-only -Wall -Wno-DECLFILENAME --timing'
From me laptop
execute pathogen#infect()
syntax on
" tagbar
nmap <F8> :TagbarToggle<CR>
let g:tagbar_type_swift = {
\ 'ctagstype': 'swift',
\ 'kinds' : [
\ 'n:Enums',
\ 't:Typealiases',
\ 'p:Protocols',
\ 'P:Protocols',
\ 's:Structs',
\ 'c:Classes',
\ 'f:Functions',
\ 'v:Variables',
\ 'e:Extensions'
\ ],
\ 'sort' : 0
\ }
"keep the defaults
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
set nocompatible
set statusline=\ %F%m%r%h%w\ %=%({%{&ff}\|%{(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\")}%k\|%Y}%)\ %L\ %([%l,%v][%p%%]\ %)
set laststatus=2
set tabstop=4
set softtabstop=4
set textwidth=132
set autoindent
"set encoding=utf-8
set noexpandtab
set shiftwidth=4
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
set showcmd
set showmatch
set sidescroll=1
set smartcase
set incsearch
set autowrite
set hidden
set noswapfile
set hlsearch
set nowrap
set exrc
set background=dark
"set autoread " I wanna know if the file changed under me
"set nowrapscan
set printfont=courier:h8
" better colours for vimdiff
colorscheme wildtim
" ycm semantic hl
"let g:ycm_enable_inlay_hints=1
let g:ycm_confirm_extra_conf=0
"let g:ycm_enable_semantic_highlighting=1
"verilator
let g:ale_verilog_verilator_options='--lint-only -Wall -Wno-DECLFILENAME --timing'
old (Army ??)
"show a right margin
set colorcolumn=160
highlight ColorColumn ctermbg=darkgrey
"make tabs (not spaces) work
set shiftwidth=4
set tabstop=4
"paths to includes etc...
"let &path.="src/include,/usr/include/AL."
another one
My .vimrc
March 15, 2015 Edit
execute pathogen#infect()
nmap :TagbarToggle
source ~/.vim/vimrcs/basic.vim
source ~/.vim/vimrcs/filetypes.vim
source ~/.vim/vimrcs/plugins_config.vim
source ~/.vim/vimrcs/extended.vim
try
source ~/.vim/my_configs.vim
catch
endtry
” Highlight all instances of word under cursor, when idle.
” Useful when studying strange source code.
” Type z/ to toggle highlighting on/off.
nnoremap z/ :if AutoHighlightToggle()set hlsendif
function! AutoHighlightToggle()
let @/ = ”
if exists(‘#auto_highlight’)
au! auto_highlight
augroup! auto_highlight
setl updatetime=4000
echo ‘Highlight current word: off’
return 0
else
augroup auto_highlight
au!
au CursorHold * let @/ = ‘\V\<'.escape(expand('‘), ‘\’).’\>’
augroup end
setl updatetime=500
echo ‘Highlight current word: ON’
return 1
endif
endfunction
ancient (circa APH)
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
vmap gx NetrwBrowseXVis
nmap gx NetrwBrowseX
vnoremap NetrwBrowseXVis
call netrw#BrowseXVis()
nnoremap NetrwBrowseX
call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '^V')),netrw#CheckIfRemote())
let &cpo=s:cpo_save
unlet s:cpo_save
set backspace=indent,eol,start
set fileencodings=ucs-bom,utf-8,default,latin1
set helplang=en
set nomodeline
set ruler
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
" vim: set ft=vim