summaryrefslogtreecommitdiff
path: root/dot_vimrc
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-12-01 16:25:58 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-12-01 16:25:58 +0100
commit8f4e5f5dbd67322bc173d04875c3b18ea70e62af (patch)
treef0316e032d8d921fb8931141190004e9d9d94a63 /dot_vimrc
parentc4282e9f748901b48f53ad63059f8dc882e05022 (diff)
downloaduser-config-8f4e5f5dbd67322bc173d04875c3b18ea70e62af.tar.gz
user-config-8f4e5f5dbd67322bc173d04875c3b18ea70e62af.zip
Update bashrc, vimrc, zshrc
Diffstat (limited to 'dot_vimrc')
-rw-r--r--dot_vimrc41
1 files changed, 33 insertions, 8 deletions
diff --git a/dot_vimrc b/dot_vimrc
index 6054b1c..2793e55 100644
--- a/dot_vimrc
+++ b/dot_vimrc
@@ -1,16 +1,16 @@
set ts=4
set sw=4
-set expandtab
-set sts=4
-autocmd FileType make setlocal noexpandtab
+" autocmd FileType make setlocal noexpandtab
+let mapleader=","
-" Mini tabs, small "m":
-map \m <Esc>:set expandtab ts=2 sw=2 sts=2<CR>
+" Tab modes.
+map <leader>m <Esc>:set expandtab ts=2 sw=2 sts=2<CR>
+map <leader>t <Esc>:set noexpandtab ts=4 sw=4<CR>
+map <leader>T <Esc>:set expandtab ts=4 sw=4 sts=4<CR>
-" Think "little tabs" and "big tabs":
-map \t <Esc>:set expandtab ts=4 sw=4 sts=4<CR>
-map \T <Esc>:set expandtab ts=8 sw=8 sts=4<CR>
+" Folds:
+map <leader>f <Esc>:set fen fdn=3 fdm=indent fml=1 fdc=3<CR>
set hlsearch
@@ -24,5 +24,30 @@ set term=xterm-256color
set cursorline
hi CursorLine cterm=bold ctermbg=0
+hi Folded ctermfg=2 ctermbg=0
+hi FoldColumn ctermfg=2 ctermbg=0
+let g:sclangTerm = "urxvt -e"
+autocmd FileType tex setlocal spell spelllang=fr
+highlight SpellBad ctermfg=red ctermbg=none
+
+let NERDTreeIgnore=['\.o$', '\.cmo$', '\.cmx$', '\.cmi$']
+
+set wildmode=list:longest
+
+au BufRead,BufNewFile *.md set filetype=markdown
+au BufRead,BufNewFile *.lus set filetype=lustre
+au BufRead,BufNewFile *.scade set filetype=scade
+
+
+" Append modeline after last line in buffer.
+" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
+" files.
+function! AppendModeline()
+ let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :",
+ \ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
+ let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
+ call append(line("$"), l:modeline)
+endfunction
+nnoremap <silent> <Leader>ml :call AppendModeline()<CR>