dotfiles

Settings and scripts
git clone git://git.konyahin.xyz/dotfiles
Log | Files | Refs | LICENSE

vimrc (1493B)


      1 set nocompatible     
      2 
      3 set incsearch
      4 set ignorecase
      5 set smartcase
      6 
      7 set number
      8 set relativenumber
      9 
     10 set scrolloff=8
     11 
     12 syntax on
     13 
     14 set backspace=indent,eol,start
     15 
     16 filetype plugin indent on
     17 set tabstop=4
     18 set shiftwidth=4
     19 set expandtab
     20 
     21 set smartindent
     22 
     23 " search for files in subdirectories, use :find to open files with partial
     24 " match, use * for fuzzy search, use :b for mae same with open buffers
     25 set path+=**
     26 set wildmenu
     27 
     28 " soft line breaks
     29 set fo+=w
     30 
     31 " string length visible limit
     32 set colorcolumn=80
     33 
     34 let mapleader="'"
     35 inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
     36 noremap <leader>q :bd<CR>
     37 
     38 " snippets
     39 " Tcl
     40 autocmd FileType tcl inoremap <leader>f foreach ! <++> {<Enter><++><Enter>}<Esc>?!<Enter>xi
     41 autocmd FileType tcl map <leader>3 :s/^/#/<Enter>j
     42 autocmd FileType tcl map <leader># :s/^#//<Enter>j
     43 
     44 " C-] jump to tag
     45 " gC-] for ambiguous tags
     46 " C-t jump back
     47 command! Tags !ectags -R .
     48 " add : to isKeyword class of characters, because I want to jump to tags with
     49 " colons in name
     50 set isk+=:
     51 
     52 " sentence should be separate with two spaces
     53 set cpo+=J
     54 
     55 " :make in shell file will triger spellcheck and show all errors (:cl)
     56 autocmd FileType sh :set makeprg=shellcheck\ -f\ gcc\ %
     57 
     58 " add "===" heading below current line
     59 nnoremap <leader>1 yypVr=
     60 
     61 " SPLITS
     62 " open vertical split and switch to them
     63 nnoremap <leader>w <C-w>v<C-w>l
     64 nnoremap <C-h> <C-w>h
     65 nnoremap <C-j> <C-w>j
     66 nnoremap <C-k> <C-w>k
     67 nnoremap <C-l> <C-w>l
     68 
     69 " X11
     70 autocmd FileType xdefaults autocmd BufWritePost * !xrdb <afile>