dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | Submodules | README | LICENSE

00-general.vim (1898B)


      1 set clipboard=unnamed " use system clipboard
      2 set dictionary+=/usr/share/dict/words " word completion using Ctrl-x Ctrl-k
      3 set directory=.,~/tmp,/var/tmp,/tmp " location for swap files
      4 set expandtab       " use the appropriate number of spaces for <Tab>
      5 set go+=c           " do not show popups in gui
      6 set hlsearch        " highlight search matches
      7 set ignorecase      " case-insensitive search
      8 set incsearch       " search as you type
      9 set laststatus=2    " always show the statusline
     10 set lbr             " break lines between words
     11 set list            " rendering of invisible characters
     12 set listchars=tab:▸\ ,eol:¬ " Use symbols for tab and end-of-line
     13 set nojoinspaces    " disable double spaces after periods
     14 set nomodeline      " disable per-file options
     15 set pastetoggle=<F2> " toggle paste mode
     16 set scrolloff=3     " show context above-below cursorline
     17 set shiftwidth=4    " width for autoindents
     18 set smartcase       " case-sensitive search if any caps
     19 set tabstop=4       " number of spaces for tab
     20 set textwidth=80    " default line width in number of characters
     21 set wildmenu        " show a navigable menu for tab completion
     22 set wildmode=longest,list,full
     23 
     24 " specify mutt aliases path, autocomplete aliases with @@ in insert mode
     25 let g:mutt_aliases_file = '~/.mutt/aliases'
     26 
     27 " split size for :Lex[plore] and :Hex[plore]. Percentage when positive, line/col
     28 " number when negative
     29 let g:netrw_winsize = 20
     30 
     31 " use faster :grep alternatives when available
     32 if executable("rg")
     33     set grepprg=rg\ --vimgrep\ --no-heading
     34     set grepformat=%f:%l:%c:%m,%f:%l:%m
     35 elseif executable("ag")
     36     set grepprg=ag\ --nogroup\ --nocolor\ --ignore-case\ --column
     37     set grepformat=%f:%l:%c:%m,%f:%l:%m
     38 endif
     39 
     40 function! StripTrailingWhitespace()
     41     if !&binary && &filetype != 'diff'
     42         normal mz
     43         normal Hmy
     44         %s/\s\+$//e
     45         normal 'yz<cr>
     46         normal `z
     47     endif
     48 endfunction