Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
- filetype plugin on
- " IMPORTANT: win32 users will need to have 'shellslash' set so that latex
- " can be called correctly.
- set shellslash
- " IMPORTANT: grep will sometimes skip displaying the file name if you
- " search in a singe file. This will confuse Latex-Suite. Set your grep
- " program to always generate a file-name.
- set grepprg=grep\ -nH\ $*
- set backspace+=indent,eol,start
- " OPTIONAL: This enables automatic indentation as you type.
- filetype indent on
- " OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
- " 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
- " The following changes the default filetype back to 'tex':
- let g:tex_flavor='latex'
- syntax on
- set ruler
- "---------
- syn on
- set nu
- set nowrap
- set linebreak
- set showbreak=>>>
- "colorscheme zenburn
- colorscheme wombat256
- set hls
- "set incsearch " use incremental search
- set autoindent
- set smartindent
- set cino=i0
- set mouse=a
- set mousemodel=popup
- set hidden
- set t_Co=256
- set so=5
- set tabstop=2
- set softtabstop=2
- set expandtab
- set shiftwidth=2
- set laststatus=2
- set statusline=%h%m%r%w%y\ %f%=l:%l\/%L\ c:%c\ p:%o\ a:0x%B\ %P
- set cursorline
- let fortran_free_source=1
- "Spell checking
- nmap <Leader>se :setlocal spell spelllang=en_us<CR>
- nmap <Leader>su :setlocal spell spelllang=en_gb<CR>
- nmap <Leader>sb :setlocal spell spelllang=en_gb<CR>
- nmap <Leader>sg :setlocal spell spelllang=de_ch<CR>
- "Buffers
- map <C-L> <ESC>:bn<cr>
- map <C-H> <ESC>:bp<cr>
- imap <C-L> <ESC>:bn<cr>i
- imap <C-H> <ESC>:bp<cr>i
- "Tab commands
- map <C-tab> :bn<cr>
- map <C-S-tab> :bp<cr>
- map <F3> :bn<cr>
- map <F4> :bp<cr>
- "copy paste with insert
- imap <S-Del> <ESC>"+di
- imap <C-Insert> <ESC>:set paste<CR>"+y:set nopaste<CR>i
- imap <S-Insert> <ESC>:set paste<CR>"+P:set nopaste<CR>i
- map <S-Del> "+d
- map <C-Insert> "+y
- map <C-S-Insert> "*y
- map <S-Insert> :set paste<CR>"+p:set nopaste<CR>
- "-------------------------------------------------------------------------------
- " Moving cursor to other windows
- "
- " shift down : change window focus to lower one (cyclic)
- " shift up : change window focus to upper one (cyclic)
- " shift left : change window focus to one on left
- " shift right : change window focus to one on right
- "-------------------------------------------------------------------------------
- "
- nmap <s-down> <c-w>w
- nmap <c-s-down> <c-w>w<c-w>_
- nmap <s-up> <c-w>W
- nmap <c-s-up> <c-w>W<c-w>_
- nmap <s-left> <c-w>h
- nmap <c-s-left> <c-w>h<c-w>\|
- nmap <s-right> <c-w>l
- nmap <c-s-right> <c-w>l<c-w>\|
- "Quickfix windows + errors
- imap <F5> <ESC>:make <cr>i
- map <F5> <ESC>:make <cr>
- imap <S-F5> <ESC>:make install<cr>i
- map <S-F5> <ESC>:make install<cr>
- imap <C-F5> <ESC>:make clean<cr>:make install<cr>i
- map <C-F5> <ESC>:make clean<cr>:make install<cr>
- map <silent> <F6> :copen<CR>
- map <silent> <S-F6> :cclose<CR>
- map <silent> <F7> :cp<CR>
- map <silent> <F8> :cn<CR>
- imap <silent> <F6> <Esc>:copen<CR>
- imap <silent> <S-F6> <Esc>:cclose<CR>
- imap <silent> <F7> <Esc>:cp<CR>
- imap <silent> <F8> <Esc>:cn<CR>
- "-------------------------------------------------------------------------------
- " Filename completion
- "
- " wildmenu : command-line completion operates in an enhanced mode
- " wildignore : A file that matches with one of these
- " patterns is ignored when completing file or directory names.
- "-------------------------------------------------------------------------------
- "
- set wildmenu
- set wildignore=*.bak,*.o,*.e,*~
- " Folding
- "highlight Folded ctermfg=yellow ctermbg=NONE
- vmap <space> zf
- nmap <space> za
- nmap <S-space> zd
- nmap <C-space> zA
- set foldcolumn=2
- set foldmethod=syntax
- set foldlevelstart=2
- " Tags
- set tags=./tags
- set tags+=/home/sandro/gravis/src/libs/tags
- "set tags+=/home/sandro/.vim/tags/stl
- nnoremap <F2> :buffers<CR>:buffer<Space>
- set guifont=Monospace\ 13
- set guioptions-=m
- set guioptions-=T
- set guioptions-=r
- set guioptions-=L
- " Formatting
- nmap Q gwap
- nnoremap <silent> <PageUp> <C-U><C-U>
- vnoremap <silent> <PageUp> <C-U><C-U>
- inoremap <silent> <PageUp> <C-\><C-O><C-U><C-\><C-O><C-U>
- nnoremap <silent> <PageDown> <C-D><C-D>
- vnoremap <silent> <PageDown> <C-D><C-D>
- inoremap <silent> <PageDown> <C-\><C-O><C-D><C-\><C-O><C-D>
- nmap <Up> gk
- nmap <Down> gj
- "
- " OmniCppComplete
- "let OmniCpp_NamespaceSearch = 1
- "let OmniCpp_GlobalScopeSearch = 1
- "let OmniCpp_ShowAccess = 1
- "let OmniCpp_MayCompleteDot = 1
- "let OmniCpp_MayCompleteArrow = 1
- "let OmniCpp_MayCompleteScope = 1
- "let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
- " build tags of your own project with CTRL+F12
- "map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
- noremap <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
- inoremap <F12> <Esc>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
- "Language
- au BufRead,BufNewFile *.smp set filetype=sampling
- au! Syntax sampling source $HOME/.vim/syntax/sampling.vim
- au BufRead,BufNewFile *.scv set filetype=veritas
- au! Syntax veritas source $HOME/.vim/syntax/veritas_scripting.vim
- function! s:insert_gates()
- let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g")
- execute "normal! i#ifndef " . gatename
- execute "normal! o#define " . gatename . " "
- execute "normal! Go#endif /* " . gatename . " */"
- normal! kk
- endfunction
- autocmd BufNewFile *.{h,hpp} call <SID>insert_gates()
Add Comment
Please, Sign In to add comment