diff --git a/.bashrc b/.bashrc index 33bb51d..891f934 100644 --- a/.bashrc +++ b/.bashrc @@ -118,6 +118,10 @@ function md() { } +# use up/down to search history, matching the current line start +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' + ############# # Processes # ############# @@ -144,7 +148,7 @@ function repeat() } # default editor -export EDITOR='gvim' +export EDITOR='gvim --nofork' # print a vim fortune at startup #/usr/games/fortune vimtips @@ -215,6 +219,7 @@ HISTTIMEFORMAT='%F %T ' alias bepo="setxkbmap -layout fr -variant bepo -option" # Super nice prompt +source ~/.liquidpromptrc source ~/.liquidprompt # Added by autojump install.sh diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..f6bcc1d --- /dev/null +++ b/.gitconfig @@ -0,0 +1,21 @@ +[user] + name = nojhan + email = nojhan@nojhan.net +[alias] + up = pull origin + st = status + di = diff + co = checkout + # create branch + cb = checkout -b + ci = commit -a -v + br = branch + sta = stash +[pager] + # use less as pager + # -R is necessary to display colors in less + # the '+' calls a command at start, that will jump to the first diff section + # then, you just have to type 'n' to iterate over diff sections + diff = less -R +'/^\\@\\@\\s' +[color] + ui = auto diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..890ee13 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,42 @@ +[submodule ".vim/bundle/vim-pathogen"] + path = .vim/bundle/vim-pathogen + url = https://github.com/tpope/vim-pathogen.git +[submodule ".vim/bundle/nerdtree"] + path = .vim/bundle/nerdtree + url = https://github.com/scrooloose/nerdtree.git +[submodule ".vim/bundle/vim-statline"] + path = .vim/bundle/vim-statline + url = https://github.com/millermedeiros/vim-statline.git +[submodule ".vim/bundle/supertab"] + path = .vim/bundle/supertab + url = https://github.com/ervandew/supertab.git +[submodule ".vim/bundle/Command-T"] + path = .vim/bundle/Command-T + url = https://github.com/wincent/Command-T.git +[submodule ".vim/bundle/tlib_vim"] + path = .vim/bundle/tlib_vim + url = https://github.com/tomtom/tlib_vim.git +[submodule ".vim/bundle/tcomment_vim"] + path = .vim/bundle/tcomment_vim + url = https://github.com/tomtom/tcomment_vim.git +[submodule ".vim/bundle/vim-eunuch"] + path = .vim/bundle/vim-eunuch + url = https://github.com/tpope/vim-eunuch.git +[submodule ".vim/bundle/vim-surround"] + path = .vim/bundle/vim-surround + url = https://github.com/tpope/vim-surround.git +[submodule ".vim/bundle/rainbow_parentheses.vim"] + path = .vim/bundle/rainbow_parentheses.vim + url = https://github.com/kien/rainbow_parentheses.vim.git +[submodule ".vim/bundle/gundo"] + path = .vim/bundle/gundo + url = https://github.com/sjl/gundo.vim.git +[submodule ".vim/bundle/minibufexpl"] + path = .vim/bundle/minibufexpl + url = https://github.com/fholgado/minibufexpl.vim.git +[submodule ".vim/bundle/tagbar"] + path = .vim/bundle/tagbar + url = https://github.com/majutsushi/tagbar.git +[submodule ".vim/vim-pathogen"] + path = .vim/vim-pathogen + url = https://github.com/tpope/vim-pathogen.git diff --git a/.vim/bundle/Command-T b/.vim/bundle/Command-T new file mode 160000 index 0000000..07087e1 --- /dev/null +++ b/.vim/bundle/Command-T @@ -0,0 +1 @@ +Subproject commit 07087e16ba8fe0a87b1d1ccd03e158a0157dc1f8 diff --git a/.vim/bundle/gundo b/.vim/bundle/gundo new file mode 160000 index 0000000..4c376a8 --- /dev/null +++ b/.vim/bundle/gundo @@ -0,0 +1 @@ +Subproject commit 4c376a8061fa335228da420937ce385b847dd56a diff --git a/.vim/bundle/minibufexpl b/.vim/bundle/minibufexpl new file mode 160000 index 0000000..d92c8b0 --- /dev/null +++ b/.vim/bundle/minibufexpl @@ -0,0 +1 @@ +Subproject commit d92c8b01248d612444829001b3e081629d37a1aa diff --git a/.vim/bundle/nerdtree b/.vim/bundle/nerdtree new file mode 160000 index 0000000..40d05ac --- /dev/null +++ b/.vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit 40d05ace57fb51cc2c2b2e9eb81c4832ed291630 diff --git a/.vim/bundle/rainbow_parentheses.vim b/.vim/bundle/rainbow_parentheses.vim new file mode 160000 index 0000000..874367f --- /dev/null +++ b/.vim/bundle/rainbow_parentheses.vim @@ -0,0 +1 @@ +Subproject commit 874367f41275d8dd43204f0c491157accc8b5f03 diff --git a/.vim/bundle/supertab b/.vim/bundle/supertab new file mode 160000 index 0000000..cb8a297 --- /dev/null +++ b/.vim/bundle/supertab @@ -0,0 +1 @@ +Subproject commit cb8a2979afca175ddc3c126c7b4a2610bd32a6f5 diff --git a/.vim/bundle/tagbar b/.vim/bundle/tagbar new file mode 160000 index 0000000..feebffc --- /dev/null +++ b/.vim/bundle/tagbar @@ -0,0 +1 @@ +Subproject commit feebffcd2a3ac171bd7a20b512567a19d94b1ea0 diff --git a/.vim/bundle/tcomment_vim b/.vim/bundle/tcomment_vim new file mode 160000 index 0000000..8e77286 --- /dev/null +++ b/.vim/bundle/tcomment_vim @@ -0,0 +1 @@ +Subproject commit 8e772866c0259de0b2f1534a37ec202386306e5b diff --git a/.vim/bundle/tlib_vim b/.vim/bundle/tlib_vim new file mode 160000 index 0000000..58122ab --- /dev/null +++ b/.vim/bundle/tlib_vim @@ -0,0 +1 @@ +Subproject commit 58122ab00417416757d62867f785d5a96021c0d0 diff --git a/.vim/bundle/vim-eunuch b/.vim/bundle/vim-eunuch new file mode 160000 index 0000000..4abf1f5 --- /dev/null +++ b/.vim/bundle/vim-eunuch @@ -0,0 +1 @@ +Subproject commit 4abf1f58614fc6b4c20bb247db59469a9a52ff9b diff --git a/.vim/bundle/vim-pathogen b/.vim/bundle/vim-pathogen new file mode 160000 index 0000000..f195ac5 --- /dev/null +++ b/.vim/bundle/vim-pathogen @@ -0,0 +1 @@ +Subproject commit f195ac5e402a1e7d0f75322558da36245dde59d6 diff --git a/.vim/bundle/vim-statline b/.vim/bundle/vim-statline new file mode 160000 index 0000000..45d369e --- /dev/null +++ b/.vim/bundle/vim-statline @@ -0,0 +1 @@ +Subproject commit 45d369eff6e2c5441ba21918825a8c215a44a951 diff --git a/.vim/bundle/vim-surround b/.vim/bundle/vim-surround new file mode 160000 index 0000000..02199ea --- /dev/null +++ b/.vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit 02199ea0080d744ec76b79d74ce56d51d25cf7ae diff --git a/.vim/spell/en.utf-8.add b/.vim/spell/en.utf-8.add new file mode 100644 index 0000000..4836cc2 --- /dev/null +++ b/.vim/spell/en.utf-8.add @@ -0,0 +1 @@ +french diff --git a/.vim/spell/en.utf-8.add.spl b/.vim/spell/en.utf-8.add.spl new file mode 100644 index 0000000..31ec5da Binary files /dev/null and b/.vim/spell/en.utf-8.add.spl differ diff --git a/.vim/spell/fr.utf-8.add b/.vim/spell/fr.utf-8.add new file mode 100644 index 0000000..7c37340 --- /dev/null +++ b/.vim/spell/fr.utf-8.add @@ -0,0 +1,11 @@ +algorithmie +anti +Thales +replanification +middleware +Petri +→ +GPS +multi +CPU +multi diff --git a/.vim/spell/fr.utf-8.add.spl b/.vim/spell/fr.utf-8.add.spl new file mode 100644 index 0000000..8b1f171 Binary files /dev/null and b/.vim/spell/fr.utf-8.add.spl differ diff --git a/.vim/spell/fr.utf-8.spl b/.vim/spell/fr.utf-8.spl new file mode 100644 index 0000000..1d60775 Binary files /dev/null and b/.vim/spell/fr.utf-8.spl differ diff --git a/.vim/syntax/Wikipedia.vim b/.vim/syntax/Wikipedia.vim new file mode 100644 index 0000000..1741d88 --- /dev/null +++ b/.vim/syntax/Wikipedia.vim @@ -0,0 +1,290 @@ +" Wikipedia syntax file for Vim +" Published on Wikipedia in 2003-04 and declared authorless. +" +" Based on the HTML syntax file. Probably too closely based, in fact. There +" may well be name collisions everywhere, but ignorance is bliss, so they say. +" +" To do: plug-in support for downloading and uploading to the server. + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif + let main_syntax = 'html' +endif + +if version < 508 + command! -nargs=+ HtmlHiLink hi link +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syn case ignore + +syn spell toplevel +set spell + +" tags +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 +syn region htmlEndTag start=++ contains=htmlTagN + +"syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,@htmlArgCluster +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster + +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster +syn match htmlTagN contained +]<"ms=s+1 + +" allowed tag names +syn keyword htmlTagName contained b i u font big small sub sup +syn keyword htmlTagName contained h1 h2 h3 h4 h5 h6 cite code em s strike strong tt var div center +syn keyword htmlTagName contained blockquote ol ul dl table caption pre +syn keyword htmlTagName contained ruby rt rb rp +syn keyword htmlTagName contained br p hr li dt dd +syn keyword htmlTagName contained table tr td th div blockquote ol ul +syn keyword htmlTagName contained dl font big small sub sup +syn keyword htmlTagName contained td th tr +syn keyword htmlTagName contained nowiki math + +" allowed arg names +syn keyword htmlArg contained title align lang dir width height +syn keyword htmlArg contained bgcolor clear noshade +syn keyword htmlArg contained cite size face color +syn keyword htmlArg contained type start value compact +syn keyword htmlArg contained summary width border frame rules +syn keyword htmlArg contained cellspacing cellpadding valign char +syn keyword htmlArg contained charoff colgroup col span abbr axis +syn keyword htmlArg contained headers scope rowspan colspan +syn keyword htmlArg contained id class name style + +" special characters +syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" + +" comments +syn region htmlComment start=++ contains=htmlCommentPart,htmlCommentError +syn match htmlCommentError contained "[^>+ + +" HTML formatting +syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlComment,htmlLink + +syn region htmlBold start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic +syn region htmlBold start="" end=""me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic +syn region htmlBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic +syn region htmlBoldItalic contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldItalicUnderline +syn region htmlBoldItalic contained start="" end=""me=e-5 contains=@htmlTop,htmlBoldItalicUnderline +syn region htmlBoldUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlBoldUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop +syn region htmlBoldItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic + +syn region htmlUnderline start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic +syn region htmlUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic +syn region htmlUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic +syn region htmlUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop,htmUnderlineItalicBold +syn region htmlUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop,htmUnderlineItalicBold +syn region htmlUnderlineItalicBold contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlUnderlineItalicBold contained start="" end=""me=e-9 contains=@htmlTop +syn region htmlUnderlineBoldItalic contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlUnderlineBoldItalic contained start="" end=""me=e-5 contains=@htmlTop + +syn region htmlItalic start="" end=""me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline +syn region htmlItalic start="" end=""me=e-5 contains=@htmlTop +syn region htmlItalicBold contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicBoldUnderline +syn region htmlItalicBold contained start="" end=""me=e-9 contains=@htmlTop,htmlItalicBoldUnderline +syn region htmlItalicBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicUnderlineBold +syn region htmlItalicUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlItalicUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop + +syn region htmlH1 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH2 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH3 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH4 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH5 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH6 start="" end=""me=e-5 contains=@htmlTop +syn region htmlHead start="" end=""me=e-7 end=""me=e-5 end=""me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,cssStyle +syn region htmlTitle start="" end=""me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment + +" wiki formatting +"syn region wikiItalic start="\([^']\|\_^\)''[^']"hs=s+1 end="[^']''\([^']\|\_$\)"he=e-1 skip=".*" contains=wikiLink,wikiItalicBold +"syn region wikiBold start="\([^']\|\_^\)'''[^']" end="[^']'''\([^']\|\_$\)" skip=".*" contains=wikiLink,wikiBoldItalic + +"syn region wikiBoldItalic contained start="\([^']\|\_^\)''[^']" end="[^']''\([^']\|\_$\)" skip=".*" contains=wikiLink +"syn region wikiItalicBold contained start="\([^']\|\_^\)'''[^']" end="[^']'''\([^']\|\_$\)" skip=".*" contains=wikiLink + +"syn region wikiBoldAndItalic start="'''''" end="'''''" skip=".*" contains=wikiLink + +syn region wikiItalic start=+'\@.*" oneline contains=@Spell,wikiLink +syn region wikiH2 start="^==" end="==" skip=".*" oneline contains=@Spell,wikiLink +syn region wikiH3 start="^===" end="===" skip=".*" oneline contains=@Spell,wikiLink +syn region wikiH4 start="^====" end="====" skip=".*" oneline contains=@Spell,wikiLink +syn region wikiH5 start="^=====" end="=====" skip=".*" oneline contains=@Spell,wikiLink +syn region wikiH6 start="^======" end="======" skip=".*" oneline contains=@Spell,wikiLink +syn region wikiLink start="\[\[" end="\]\]\(s\|'s\|es\|ing\|\)" skip=".*" oneline contains=wikiLink +syn region wikiLink start="\[http:" end="\]" skip=".*" oneline +syn region wikiLink start="\[https:" end="\]" skip=".*" oneline +syn region wikiLink start="\[ftp:" end="\]" skip=".*" oneline +syn region wikiLink start="\[gopher:" end="\]" skip=".*" oneline +syn region wikiLink start="\[news:" end="\]" skip=".*" oneline +syn region wikiLink start="\[mailto:" end="\]" skip=".*" oneline +syn region wikiTemplate start="{{" end="}}" skip=".*" + +syn match wikiParaFormatChar /^[\:|\*|;|#]\+/ +syn match wikiParaFormatChar /^-----*/ +syn match wikiPre /^\ .*$/ + +syn include @TeX syntax/tex.vim +syntax region wikiTeX matchgroup=htmlTag start="" end="" skip=".*" contains=@texMathZoneGroup +syntax region wikiRef matchgroup=htmlTag start="" end="" skip=".*" + + +" HTML highlighting + +HtmlHiLink htmlTag Function +HtmlHiLink htmlEndTag Identifier +HtmlHiLink htmlArg Type +HtmlHiLink htmlTagName htmlStatement +HtmlHiLink htmlSpecialTagName Exception +HtmlHiLink htmlValue String +HtmlHiLink htmlSpecialChar Special + +HtmlHiLink htmlH1 Title +HtmlHiLink htmlH2 htmlH1 +HtmlHiLink htmlH3 htmlH2 +HtmlHiLink htmlH4 htmlH3 +HtmlHiLink htmlH5 htmlH4 +HtmlHiLink htmlH6 htmlH5 +HtmlHiLink htmlHead PreProc +HtmlHiLink htmlTitle Title +HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic +HtmlHiLink htmlUnderlineBold htmlBoldUnderline +HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic +HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic +HtmlHiLink htmlItalicUnderline htmlUnderlineItalic +HtmlHiLink htmlItalicBold htmlBoldItalic +HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic +HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + +HtmlHiLink htmlSpecial Special +HtmlHiLink htmlSpecialChar Special +HtmlHiLink htmlString String +HtmlHiLink htmlStatement Statement +HtmlHiLink htmlComment Comment +HtmlHiLink htmlCommentPart Comment +HtmlHiLink htmlValue String +HtmlHiLink htmlCommentError htmlError +HtmlHiLink htmlTagError htmlError +HtmlHiLink htmlEvent javaScript +HtmlHiLink htmlError Error + +HtmlHiLink htmlCssStyleComment Comment +HtmlHiLink htmlCssDefinition Special + +" The default highlighting. +if version >= 508 || !exists("did_html_syn_inits") + if version < 508 + let did_html_syn_inits = 1 + endif + HtmlHiLink htmlTag Function + HtmlHiLink htmlEndTag Identifier + HtmlHiLink htmlArg Type + HtmlHiLink htmlTagName htmlStatement + HtmlHiLink htmlSpecialTagName Exception + HtmlHiLink htmlValue String + HtmlHiLink htmlSpecialChar Special + +if !exists("html_no_rendering") + HtmlHiLink htmlH1 Title + HtmlHiLink htmlH2 htmlH1 + HtmlHiLink htmlH3 htmlH2 + HtmlHiLink htmlH4 htmlH3 + HtmlHiLink htmlH5 htmlH4 + HtmlHiLink htmlH6 htmlH5 + HtmlHiLink htmlHead PreProc + HtmlHiLink htmlTitle Title + HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBold htmlBoldUnderline + HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderline htmlUnderlineItalic + HtmlHiLink htmlItalicBold htmlBoldItalic + HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + HtmlHiLink htmlLink Underlined + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic + endif +endif + + HtmlHiLink htmlPreStmt PreProc + HtmlHiLink htmlPreError Error + HtmlHiLink htmlPreProc PreProc + HtmlHiLink htmlPreAttr String + HtmlHiLink htmlPreProcAttrName PreProc + HtmlHiLink htmlPreProcAttrError Error + HtmlHiLink htmlSpecial Special + HtmlHiLink htmlSpecialChar Special + HtmlHiLink htmlString String + HtmlHiLink htmlStatement Statement + HtmlHiLink htmlComment Comment + HtmlHiLink htmlCommentPart Comment + HtmlHiLink htmlValue String + HtmlHiLink htmlCommentError htmlError + HtmlHiLink htmlTagError htmlError + HtmlHiLink htmlEvent javaScript + HtmlHiLink htmlError Error + + HtmlHiLink javaScript Special + HtmlHiLink javaScriptExpression javaScript + HtmlHiLink htmlCssStyleComment Comment + HtmlHiLink htmlCssDefinition Special +endif + +" wiki highlighting + +HtmlHiLink wikiItalic htmlItalic +HtmlHiLink wikiBold htmlBold + +HtmlHiLink wikiBoldItalic htmlBoldItalic +HtmlHiLink wikiItalicBold htmlBoldItalic + +HtmlHiLink wikiBoldAndItalic htmlBoldItalic + +HtmlHiLink wikiH1 htmlH1 +HtmlHiLink wikiH2 htmlH2 +HtmlHiLink wikiH3 htmlH3 +HtmlHiLink wikiH4 htmlH4 +HtmlHiLink wikiH5 htmlH5 +HtmlHiLink wikiH6 htmlH6 +HtmlHiLink wikiLink Underlined +HtmlHiLink wikiTemplate Special +HtmlHiLink wikiParaFormatChar Special +HtmlHiLink wikiPre Constant +HtmlHiLink wikiRef Comment + + +let b:current_syntax = "html" + +delcommand HtmlHiLink + +if main_syntax == 'html' + unlet main_syntax +endif \ No newline at end of file diff --git a/.vim/vim-pathogen b/.vim/vim-pathogen new file mode 160000 index 0000000..f195ac5 --- /dev/null +++ b/.vim/vim-pathogen @@ -0,0 +1 @@ +Subproject commit f195ac5e402a1e7d0f75322558da36245dde59d6 diff --git a/.vimrc b/.vimrc index 2c4fd4d..eaa8a15 100644 --- a/.vimrc +++ b/.vimrc @@ -1,17 +1,6 @@ +set nocompatible " do not try to be vi-compatible + call pathogen#infect() -" Interesting plugins: -" pathogen - easy plugin installation -" surround - easily delete, change and add surrounding pairs of characters -" Gundo - visualizing the undo tree -" RainbowParenthesis - highlights matching parenthesis with a rainbow of colors -" tComment - smart comments toggle -" omnicppcomplete - C/C++ completion with ctags (what about clangcomplete?) -" ack - run ack-grep from vim, and shows the results in a split window -" bclose - The :Bclose command deletes a buffer without changing the window layout -" minibufexpl - list your open buffers as tabs along the top or bottom of your screen -" tasklist - search the file for FIXME, TODO, … and put them in a handy list -" yankring - maintains a list of numbered registers containing the last deletes, see :YRShow -" taglist - groups and displays the functions, classes, … in a Vim window set guifont=Inconsolata\ 11 @@ -29,8 +18,6 @@ set textwidth=120 set wrap " auto wrap line view, but not text itself filetype indent on " activates indenting for files -set autoindent " automatic indentation -set smartindent set softtabstop=4 " width of a tab set tabstop=4 set shiftwidth=4 " width of the indentation @@ -46,7 +33,6 @@ set wildmenu " command-line completion shows a list of matches set wildmode=longest,list:longest,full " Bash-vim completion behavior set autochdir " use current working directory of a file as base path -set nocompatible " do not try to be vi-compatible set encoding=utf-8 set nu " show line numbers @@ -63,7 +49,7 @@ set colorcolumn=72,120 " highligth the 80th and 120th column " No need to prefix them with "* or "+ set clipboard=unnamed -" New split plaed below +" New split placed below set splitbelow " New vsplit placed right set splitright @@ -78,6 +64,12 @@ set undodir=~/.vim/undodir " always keep lines around the cursor set scrolloff=5 +" Let cursor move past the last char in visual block mode +set virtualedit=block + +" show more matching characters +set matchpairs+=<:> + let mapleader = "," " leader key is comma " xx will delete the line without copying it into the default register @@ -92,6 +84,11 @@ nnoremap G Gzz " ,v will reselect the text that was just pasted nnoremap v V`] +" ,w will disable autowrap line break +nnoremap w :set tw=0 +nnoremap W :set tw=80 +nnoremap x :set tw=120 + " ,s will split vertically and swith over the new panel nnoremap s vl:bn @@ -142,12 +139,12 @@ au VimEnter * echomsg system('/usr/games/fortune vimtweets') set laststatus=2 " always show the statusline, even when there is only one file edited -if has("statusline") - "set statusline=\ %f%m%r\ [%{strlen(&ft)?&ft:'aucun'},%{strlen(&fenc)?&fenc:&enc},%{&fileformat},ts:%{&tabstop}]%{fugitive#statusline()}%=%l,%c%V\ %P - set statusline=\ %f%m%r\ [%{strlen(&ft)?&ft:'aucun'},%{strlen(&fenc)?&fenc:&enc},%{&fileformat},ts:%{&tabstop}]%=%l,%c%V\ %P -elseif has("cmdline_info") - set ruler " show current line and column number -endif +" if has("statusline") +" "set statusline=\ %f%m%r\ [%{strlen(&ft)?&ft:'aucun'},%{strlen(&fenc)?&fenc:&enc},%{&fileformat},ts:%{&tabstop}]%{fugitive#statusline()}%=%l,%c%V\ %P +" set statusline=\ %f%m%r\ [%{strlen(&ft)?&ft:'aucun'},%{strlen(&fenc)?&fenc:&enc},%{&fileformat},ts:%{&tabstop}]%=%l,%c%V\ %P +" elseif has("cmdline_info") +" set ruler " show current line and column number +" endif if has("fname_case") @@ -172,25 +169,25 @@ au BufRead,BufNewFile *.mwiki setf Wikipedia au BufRead,BufNewFile *.wikipedia.org.* setf Wikipedia " autocomplétion with instead of , depending on the context -function! Smart_TabComplete() - let line = getline('.') " curline - let substr = strpart(line, -1, col('.')+1) " from start to cursor - let substr = matchstr(substr, "[^ \t]*$") " word till cursor - if (strlen(substr)==0) " nothing to match on empty string - return "\" - endif - let has_period = match(substr, '\.') != -1 " position of period, if any - let has_slash = match(substr, '\/') != -1 " position of slash, if any - if (!has_period && !has_slash) - return "\\" " existing text matching - elseif ( has_slash ) - return "\\" " file matching - else - return "\\" " plugin matching - endif -endfunction +" function! Smart_TabComplete() +" let line = getline('.') " curline +" let substr = strpart(line, -1, col('.')+1) " from start to cursor +" let substr = matchstr(substr, "[^ \t]*$") " word till cursor +" if (strlen(substr)==0) " nothing to match on empty string +" return "\" +" endif +" let has_period = match(substr, '\.') != -1 " position of period, if any +" let has_slash = match(substr, '\/') != -1 " position of slash, if any +" if (!has_period && !has_slash) +" return "\\" " existing text matching +" elseif ( has_slash ) +" return "\\" " file matching +" else +" return "\\" " plugin matching +" endif +" endfunction -inoremap =Smart_TabComplete() +" inoremap =Smart_TabComplete() " Append modeline after last line in buffer. @@ -225,10 +222,13 @@ imap :call MySpellLang() map TaskList " side pane of class and functions -map :TlistToggle +"map :TlistToggle +nmap :TagbarToggle +nnoremap b :TagbarToggle " side pane of files map :NERDTreeToggle +nnoremap t :NERDTreeToggle " configure tags - add additional tags here or comment out not-used ones set tags+=~/.vim/tags/cpp @@ -257,5 +257,3 @@ set completeopt=menuone,menu,longest,preview :runtime plugins/bclose.vim nmap :bc Kwbd - -