diff --git a/.Xdefaults b/.Xdefaults index a7ecd17..93c954f 100644 --- a/.Xdefaults +++ b/.Xdefaults @@ -22,6 +22,8 @@ XTerm*termName: xterm-256color !!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 !!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 +! URxvt*font: *-fixed-*-*-*-18-* +URxvt.font: xft:bitstream vera sans mono:size=12:antialias=true XTerm*background: #000000 XTerm*foreground: #93a1a1 @@ -54,7 +56,7 @@ URxvt*color14: #519f50 ! LightGrey + White URxvt*color7: #dddddd URxvt*color15: #ffffff -URxvt*cutchars: \n"'&()*,;<=>?@[]{|}: +URxvt*cutchars: "\n\"'&()*,;<=>?@[]{|}:" !URxvt*transparent: true !URxvt*shading: 10 diff --git a/.bashrc b/.bashrc index 7a36861..d76517d 100644 --- a/.bashrc +++ b/.bashrc @@ -12,19 +12,21 @@ fi function proxy() { proxy_url="$(~/proxy.sh)" - export http_proxy="$proxy_url" - export https_proxy="$proxy_url" - export ftp_proxy="$proxy_url" - echo ${proxy_url##*@} + IFS=' ' read -r -a proxies <<< "$proxy_url" + export http_proxy="${proxies[0]}" + export https_proxy="${proxies[1]}" + export ftp_proxy="${proxies[0]}" + echo ${proxies[@]} } function proxy_app() { proxy_url="$(~/proxy_app.sh)" - export http_proxy="$proxy_url" - export https_proxy="$proxy_url" - export ftp_proxy="$proxy_url" - echo ${proxy_url##*@} + IFS=' ' read -r -a proxies <<< "$proxy_url" + export http_proxy="${proxies[0]}" + export https_proxy="${proxies[1]}" + export ftp_proxy="${proxies[0]}" + echo ${proxies[@]} } function noproxy() @@ -267,6 +269,13 @@ function ctex() $@ 2>&1 | colout -t latex } +function m() +{ + set -o pipefail + cm cmake .. && cm make $@ && ./$@ +} + + # shortcut to display the url config of remote repo in a git root alias git_remotes="grep -A 2 \"\[remote\" .git/config|grep -v fetch|sed \"s/\[remote \\\"//\"|sed ':a;N;\$!ba;s/\"\]\n\s*url = /\t/g'" @@ -312,7 +321,7 @@ calc() { ################# # Note: purge-old-kernels is in the bikeshed package -alias upgrade="sudo apt update && sudo apt dist-upgrade -y && sudo purge-old-kernels --keep 2 && sudo apt --purge autoremove -y && sudo apt autoclean -y && sudo apt clean" +alias upgrade="sudo apt update && sudo apt dist-upgrade -y && sudo apt --purge autoremove -y && sudo apt autoclean -y && sudo apt clean" # alias I want to learn function h() diff --git a/.gdbinit b/.gdbinit index b9774fe..330f70b 100644 --- a/.gdbinit +++ b/.gdbinit @@ -26,7 +26,8 @@ define logging_on # Instead of printing on stdout only, log everything... set logging redirect on # ... in our named pipe. - set logging on /tmp/coloutPipe + set logging file /tmp/coloutPipe + set logging on end define logging_off diff --git a/.notion/cfg_notion.lua b/.notion/cfg_notion.lua index 819d151..c745037 100644 --- a/.notion/cfg_notion.lua +++ b/.notion/cfg_notion.lua @@ -1,6 +1,8 @@ dopath("cfg_defaults") +dopath("mod_statusbar") + -- Mod1 = Alt -- Mod4 = Window -- rajouter "+" après le code pour les concaténations suivantes @@ -81,8 +83,11 @@ defbindings("WScreen", { kpress(META.."8", "WScreen.switch_nth(_, 7)"), kpress(META.."9", "WScreen.switch_nth(_, 8)"), kpress(META.."0", "WScreen.switch_nth(_, 9)"), - - kpress(META.."N", "ioncore.goto_nextact()") + + kpress(META.."N", "ioncore.goto_nextact()"), + + bdoc("Create a new workspace of chosen default type."), + kpress(META.."F9", "ioncore.create_ws(_)") }) defbindings("WTiling", { @@ -115,7 +120,101 @@ defbindings("WTiling", { kpress(META.."D", "WTiling.unsplit_at(_, _sub)"), }) +defbindings("WScreen", { + bdoc("Toggle scratchpad."), + kpress(META.."space", "mod_sp.set_shown_on(_, 'toggle')"), + + -- A more ideal key for toggling the scratchpad would be the key left of + -- the key for numeral 1. Unfortunately the symbols mapped to this key + -- vary by the keyboard layout, and to be fully portable to different + -- architechtures and fancy keyboards, we can't rely on keycodes either. + -- However, on standard Finnish/Swedish (and other Nordic) keyboard + -- layouts the following should work: + --kpress(META.."section", "mod_sp.set_shown_on(_, 'toggle')"), + -- and on UK and US layouts this should work: + --kpress(META.."grave", "mod_sp.set_shown_on(_, 'toggle')"), +}) -- pour mettre la stalonetray dans le dock -- defwinprop {class="stalonetray", statusbar="dock"} +-- WFrame context bindings +-- +-- These bindings are common to all types of frames. Some additional +-- frame bindings are found in some modules' configuration files. + +defbindings("WFrame", { + submap(META.."K", { + bdoc("Maximize the frame horizontally/vertically."), + kpress("H", "WFrame.maximize_horiz(_)"), + kpress("V", "WFrame.maximize_vert(_)"), + }), + + bdoc("Display context menu."), + mpress("Button3", "mod_menu.pmenu(_, _sub, 'ctxmenu')"), + + bdoc("Begin move/resize mode."), + kpress(META.."R", "WFrame.begin_kbresize(_)"), + + bdoc("Switch the frame to display the object indicated by the tab."), + mclick("Button1@tab", "WFrame.p_switch_tab(_)"), + mclick("Button2@tab", "WFrame.p_switch_tab(_)"), + + bdoc("Resize the frame."), + mdrag("Button1@border", "WFrame.p_resize(_)"), + mdrag(META.."Button3", "WFrame.p_resize(_)"), + + bdoc("Move the frame."), + mdrag(META.."Button1", "WFrame.p_move(_)"), + + bdoc("Move objects between frames by dragging and dropping the tab."), + mdrag("Button1@tab", "WFrame.p_tabdrag(_)"), + mdrag("Button2@tab", "WFrame.p_tabdrag(_)"), + + bdoc("Switch to next/previous object within the frame."), + mclick(META.."Button4", "WFrame.switch_next(_)"), + mclick(META.."Button5", "WFrame.switch_prev(_)"), +}) + + +-- WMoveresMode context bindings +-- +-- These bindings are available keyboard move/resize mode. The mode +-- is activated on frames with the command begin_kbresize (bound to +-- META.."R" above by default). + +defbindings("WMoveresMode", { + bdoc("Cancel the resize mode."), + kpress("AnyModifier+Escape","WMoveresMode.cancel(_)"), + + bdoc("End the resize mode."), + kpress("AnyModifier+Return","WMoveresMode.finish(_)"), + + bdoc("Grow in specified direction."), + kpress("Left", "WMoveresMode.resize(_, 1, 0, 0, 0)"), + kpress("Right", "WMoveresMode.resize(_, 0, 1, 0, 0)"), + kpress("Up", "WMoveresMode.resize(_, 0, 0, 1, 0)"), + kpress("Down", "WMoveresMode.resize(_, 0, 0, 0, 1)"), + + bdoc("Shrink in specified direction."), + kpress("Shift+Left", "WMoveresMode.resize(_,-1, 0, 0, 0)"), + kpress("Shift+Right", "WMoveresMode.resize(_, 0,-1, 0, 0)"), + kpress("Shift+Up", "WMoveresMode.resize(_, 0, 0,-1, 0)"), + kpress("Shift+Down", "WMoveresMode.resize(_, 0, 0, 0,-1)"), + + bdoc("Move in specified direction."), + kpress(META.."Left", "WMoveresMode.move(_,-1, 0)"), + kpress(META.."Right", "WMoveresMode.move(_, 1, 0)"), + kpress(META.."Up", "WMoveresMode.move(_, 0,-1)"), + kpress(META.."Down", "WMoveresMode.move(_, 0, 1)"), +}) + + +-- Client window group bindings + +defbindings("WGroupCW", { + bdoc("Toggle client window group full-screen mode"), + kpress_wait(META.."Return", "WGroup.set_fullscreen(_, 'toggle')"), +}) + + diff --git a/.notion/cfg_statusbar.lua b/.notion/cfg_statusbar.lua index 54fdf40..bee18ed 100644 --- a/.notion/cfg_statusbar.lua +++ b/.notion/cfg_statusbar.lua @@ -38,47 +38,48 @@ mod_statusbar.create{ -- --template="[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ] %filler%systray", --template=" %filler%systray [ load: % %>load || mail: %>mail_new/%>mail_total || %date ]", - template="%date %systray_dock %systray %workspace_pager bat: %laptopstatus_batterypercent (%laptopstatus_batterytimeleft) %filler %vv_disk_ - %vv_disk_home", -} - --- Create a statusbar -mod_statusbar.create{ - -- First screen, bottom left corner - screen=1, - pos='tr', - -- Set this to true if you want a full-width statusbar - fullsize=false, - -- Swallow systray windows - systray=true, - - -- Template. Tokens %string are replaced with the value of the - -- corresponding meter. Currently supported meters are: - -- date date - -- load load average (1min, 5min, 15min) - -- load_Nmin N minute load average (N=1, 5, 15) - -- mail_new mail count (mbox format file $MAIL) - -- mail_unread mail count - -- mail_total mail count - -- mail_*_new mail count (from an alternate mail folder, see below) - -- mail_*_unread mail count - -- mail_*_total mail count - -- - -- Space preceded by % adds stretchable space for alignment of variable - -- meter value widths. > before meter name aligns right using this - -- stretchable space , < left, and | centers. - -- Meter values may be zero-padded to a width preceding the meter name. - -- These alignment and padding specifiers and the meter name may be - -- enclosed in braces {}. - -- - -- %filler causes things on the marker's sides to be aligned left and - -- right, respectively, and %systray is a placeholder for system tray - -- windows and icons. - -- - --template="[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ] %filler%systray", - --template=" %filler%systray [ load: % %>load || mail: %>mail_new/%>mail_total || %date ]", - template="%filler %systray_dock %systray %date", + -- template="%date %systray_dock %systray %workspace_pager bat: %laptopstatus_batterypercent (%laptopstatus_batterytimeleft) %filler %vv_disk_ - %vv_disk_home", + template="%date %systray_dock systray %workspace_pager %filler %vv_disk_ - %vv_disk_home", } +-- -- Create a statusbar +-- mod_statusbar.create{ +-- -- First screen, bottom left corner +-- screen=1, +-- pos='tr', +-- -- Set this to true if you want a full-width statusbar +-- fullsize=false, +-- -- Swallow systray windows +-- systray=true, +-- +-- -- Template. Tokens %string are replaced with the value of the +-- -- corresponding meter. Currently supported meters are: +-- -- date date +-- -- load load average (1min, 5min, 15min) +-- -- load_Nmin N minute load average (N=1, 5, 15) +-- -- mail_new mail count (mbox format file $MAIL) +-- -- mail_unread mail count +-- -- mail_total mail count +-- -- mail_*_new mail count (from an alternate mail folder, see below) +-- -- mail_*_unread mail count +-- -- mail_*_total mail count +-- -- +-- -- Space preceded by % adds stretchable space for alignment of variable +-- -- meter value widths. > before meter name aligns right using this +-- -- stretchable space , < left, and | centers. +-- -- Meter values may be zero-padded to a width preceding the meter name. +-- -- These alignment and padding specifiers and the meter name may be +-- -- enclosed in braces {}. +-- -- +-- -- %filler causes things on the marker's sides to be aligned left and +-- -- right, respectively, and %systray is a placeholder for system tray +-- -- windows and icons. +-- -- +-- --template="[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ] %filler%systray", +-- --template=" %filler%systray [ load: % %>load || mail: %>mail_new/%>mail_total || %date ]", +-- template="%filler %systray_dock %systray %date", +-- } +-- -- Launch ion-statusd. This must be done after creating any statusbars diff --git a/.vim/bundle/color_coded b/.vim/bundle/color_coded index 07eab11..16e71d6 160000 --- a/.vim/bundle/color_coded +++ b/.vim/bundle/color_coded @@ -1 +1 @@ -Subproject commit 07eab1106fa1c26dd1936b7d031d843170eb9d8f +Subproject commit 16e71d6f5850849c6ffc9a06a7c952e27d351866 diff --git a/.vim/bundle/ctrlp.vim b/.vim/bundle/ctrlp.vim index b5d3fe6..564176f 160000 --- a/.vim/bundle/ctrlp.vim +++ b/.vim/bundle/ctrlp.vim @@ -1 +1 @@ -Subproject commit b5d3fe66a58a13d2ff8b6391f4387608496a030f +Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981 diff --git a/.vim/bundle/gundo b/.vim/bundle/gundo index 3975ac8..46c443e 160000 --- a/.vim/bundle/gundo +++ b/.vim/bundle/gundo @@ -1 +1 @@ -Subproject commit 3975ac871565115e3769dc69c06bc88ddc1369af +Subproject commit 46c443ee9d5854320eb965a1fdee781ba83a070e diff --git a/.vim/bundle/nerdtree b/.vim/bundle/nerdtree index b0bb781..729e801 160000 --- a/.vim/bundle/nerdtree +++ b/.vim/bundle/nerdtree @@ -1 +1 @@ -Subproject commit b0bb781fc73ef40365e4c996a16f04368d64fc9d +Subproject commit 729e8014b9ffb17ff1298ef96fb7094f8e5ffa49 diff --git a/.vim/bundle/quickfixsigns_vim b/.vim/bundle/quickfixsigns_vim index 0c58563..653cf16 160000 --- a/.vim/bundle/quickfixsigns_vim +++ b/.vim/bundle/quickfixsigns_vim @@ -1 +1 @@ -Subproject commit 0c5856330246191e76e53a4238e13b308b76e070 +Subproject commit 653cf16034cdbbe640e63ac9698f7da587c0fa56 diff --git a/.vim/bundle/rainbow b/.vim/bundle/rainbow index 9fd6b65..7871d3e 160000 --- a/.vim/bundle/rainbow +++ b/.vim/bundle/rainbow @@ -1 +1 @@ -Subproject commit 9fd6b6527d4bdd5d24506ce4a658fe4a0be079ad +Subproject commit 7871d3e2350c91816c1aeeaf3a858fa9934efdac diff --git a/.vim/bundle/supertab b/.vim/bundle/supertab index 7a32e08..40fe711 160000 --- a/.vim/bundle/supertab +++ b/.vim/bundle/supertab @@ -1 +1 @@ -Subproject commit 7a32e0866bfea26cf7781935289df131d1d0c0e0 +Subproject commit 40fe711e088e2ab346738233dd5adbb1be355172 diff --git a/.vim/bundle/tagbar b/.vim/bundle/tagbar index 614b5b2..387bbad 160000 --- a/.vim/bundle/tagbar +++ b/.vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit 614b5b244f3a7a9e0174ebcf73c809de6e62e32c +Subproject commit 387bbadda98e1376ff3871aa461b1f0abd4ece70 diff --git a/.vim/bundle/tcomment_vim b/.vim/bundle/tcomment_vim index 13de0a6..f5c527b 160000 --- a/.vim/bundle/tcomment_vim +++ b/.vim/bundle/tcomment_vim @@ -1 +1 @@ -Subproject commit 13de0a6d603f95bd9192ec1e5f6ff1fa941d06a2 +Subproject commit f5c527b67d2e8cce748bfbecccb8b8c69788386c diff --git a/.vim/bundle/tlib_vim b/.vim/bundle/tlib_vim index 95f6fe6..ced8f3e 160000 --- a/.vim/bundle/tlib_vim +++ b/.vim/bundle/tlib_vim @@ -1 +1 @@ -Subproject commit 95f6fe6e4ba1a7d15015d3dbe26074f1150e2d5e +Subproject commit ced8f3ebe85b50da2ec0e6d593e6b2e8e6bd243b diff --git a/.vim/bundle/ultisnips b/.vim/bundle/ultisnips index 1c6b4f7..6fdc364 160000 --- a/.vim/bundle/ultisnips +++ b/.vim/bundle/ultisnips @@ -1 +1 @@ -Subproject commit 1c6b4f75a006c4411d01a1234cabda3eb4aded1a +Subproject commit 6fdc3647f72e0a1f321ea6bd092ecd01f7c187ba diff --git a/.vim/bundle/vim-eunuch b/.vim/bundle/vim-eunuch index 6a4d193..10da325 160000 --- a/.vim/bundle/vim-eunuch +++ b/.vim/bundle/vim-eunuch @@ -1 +1 @@ -Subproject commit 6a4d1933ad61ad94f2fa06905337a51cb0304ac1 +Subproject commit 10da325fb032a1acfa9222d273459f53bad30ba4 diff --git a/.vim/bundle/vim-multiple-cursors b/.vim/bundle/vim-multiple-cursors index 35028be..dd9289a 160000 --- a/.vim/bundle/vim-multiple-cursors +++ b/.vim/bundle/vim-multiple-cursors @@ -1 +1 @@ -Subproject commit 35028be1f71953da9f2c28509bf6c5ebd1d31c28 +Subproject commit dd9289af03abafa76b28c503e20747ff7d7d89e5 diff --git a/.vim/bundle/vim-pathogen b/.vim/bundle/vim-pathogen index 1270dce..06da921 160000 --- a/.vim/bundle/vim-pathogen +++ b/.vim/bundle/vim-pathogen @@ -1 +1 @@ -Subproject commit 1270dceb1fe0ca35f8b292c7b41b45b42c5a0cc1 +Subproject commit 06da921608b971fb47603671bcafdb2843992eb3 diff --git a/.vim/bundle/vim-snippets b/.vim/bundle/vim-snippets index e840b91..2573abc 160000 --- a/.vim/bundle/vim-snippets +++ b/.vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit e840b91a4e86cda657519eba00766a29a614e1e2 +Subproject commit 2573abcb676ec771b35681e754dc8fc79b5a33a2 diff --git a/.vim/bundle/vim-surround b/.vim/bundle/vim-surround index 42e9b46..5970688 160000 --- a/.vim/bundle/vim-surround +++ b/.vim/bundle/vim-surround @@ -1 +1 @@ -Subproject commit 42e9b46e7a20a2f394664874c7bbd9d6f6c39e8a +Subproject commit 597068870b8f093a8b2d11536c62ff31222ee8d0 diff --git a/.vim/colors/base16-railscasts-noj.vim b/.vim/colors/base16-railscasts-noj.vim index 0f6ab57..059dcf4 100644 --- a/.vim/colors/base16-railscasts-noj.vim +++ b/.vim/colors/base16-railscasts-noj.vim @@ -5,19 +5,23 @@ let s:gui00 = "2b2b2b" let s:gui01 = "272935" let s:gui02 = "3a4055" -let s:gui03 = "5a647e" +" let s:gui03 = "5a647e" +let s:gui03 = "6b758f" let s:gui04 = "d4cfc9" let s:gui05 = "e6e1dc" let s:gui06 = "f4f1ed" let s:gui07 = "f9f7f3" let s:gui08 = "da4939" -let s:gui09 = "cc7833" +" let s:gui09 = "cc7833" +let s:gui09 = "cc7844" let s:gui0A = "ffc66d" let s:gui0B = "a5c261" let s:gui0C = "519f50" let s:gui0D = "6d9cbe" let s:gui0E = "b6b3eb" let s:gui0F = "bc9458" +" let s:gui10 = "ccddff" +let s:gui10 = "ffccbb" " Terminal color definitions let s:cterm00 = "00" @@ -195,7 +199,7 @@ call hi("Special", s:gui0C, "", s:cterm0C, "", "") call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "") call hi("Statement", s:gui08, "", s:cterm08, "", "") call hi("StorageClass", s:gui0A, "", s:cterm0A, "", "") -call hi("String", s:gui09, s:gui01, s:cterm09, s:cterm01, "") +call hi("String", s:gui09, s:gui01, s:cterm09, s:cterm01, "") call hi("Structure", s:gui0E, "", s:cterm0E, "", "") call hi("Tag", s:gui0A, "", s:cterm0A, "", "") call hi("Todo", s:gui07, s:gui08, s:cterm07, s:cterm08, "") @@ -211,6 +215,8 @@ call hi("cppStructure", s:gui0D, "", s:cterm0D, "", "none") call hi("cppEndline", s:gui03, "", s:cterm03, "", "none") call hi("cppTrailingSpace", s:gui08, s:gui04, s:cterm08, s:cterm04, "") call hi("cppMacro", s:gui03, "", s:cterm03, "", "none") +" call hi("cppMember", s:gui10, "", s:cterm06, "", "none") +call hi("cppMember", s:gui04, "", s:cterm06, "", "italic") " Spelling highlighting call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl") diff --git a/.vim/disabled/YouCompleteMe b/.vim/disabled/YouCompleteMe deleted file mode 160000 index 7f21fb6..0000000 --- a/.vim/disabled/YouCompleteMe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7f21fb6092290ded4669941e41c8f984035a18a2 diff --git a/.vim/spell/en.utf-8.add b/.vim/spell/en.utf-8.add index 14df926..f6f9193 100644 --- a/.vim/spell/en.utf-8.add +++ b/.vim/spell/en.utf-8.add @@ -7,3 +7,6 @@ eikonal Eulerian cartesian cardinality +discretization +algorithmics +anisotropic diff --git a/.vim/spell/en.utf-8.add.spl b/.vim/spell/en.utf-8.add.spl index 9043a51..14024f3 100644 Binary files a/.vim/spell/en.utf-8.add.spl and b/.vim/spell/en.utf-8.add.spl differ diff --git a/.vim/syntax/cpp.vim b/.vim/syntax/cpp.vim index a26bf17..f31b6ee 100644 --- a/.vim/syntax/cpp.vim +++ b/.vim/syntax/cpp.vim @@ -21,13 +21,13 @@ endif " C++ extentions -syn keyword cppSTL abort abs accumulate acos adjacent_difference adjacent_find adjacent_find_if any append asctime asin assign at atan atan2 atexit atof atoi atol auto_ptr back back_inserter bad bad_alloc bad_cast bad_exception bad_typeid badbit beg begin binary_compose binary_negate binary_search bind2nd binder1st binder2nd bitset bsearch c_str calloc capacity ceil cerr cin clear clearerr clock clog close compare compose1 compose2 const_iterator construct copy copy_backward copy_n cos cosh count count_if cout ctime data deque destroy difference_type difftime div divides domain_error empty end endl eof eofbit equal equal_range erase exception exit exp fabs fail failbit failure fclose feof ferror fflush fgetc fgetpos fgets fill fill_n find find_end find_first_not_of find_first_of find_if find_last_not_of find_last_of first flags flip floor flush fmod fopen for_each fprintf fputc fputs fread free freopen frexp front fscanf fseek fsetpos fstream ftell fwrite gcount generate generate_n get get_temporary_buffer getc getchar getenv getline gets gmtime good goodbit greater greater_equal hash_map hash_multimap hash_multiset hash_set ifstream ignore in includes inner_product inplace_merge insert inserter invalid_argument ios ios_base iostate iota is_heap is_open is_sorted isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace istream istream_iterator istringstream isupper isxdigit iter_swap iterator iterator_category key_comp ldiv length length_error less less_equal lexicographical_compare lexicographical_compare_3way list localtime log log10 logic_error logical_and logical_not logical_or longjmp lower_bound make_heap malloc map max max_element max_size mem_fun mem_fun1 mem_fun1_ref mem_fun_ref memchr memcpy memmove memset merge min min_element minus mismatch mktime modf modulus multimap multiplies multiset negate next_permutation npos nth_element numeric_limits ofstream open ostream ostream_iterator ostringstream out_of_range overflow_error pair make_pair partial_sort partial_sort_copy partial_sum partition peek perror plus pointer pointer_to_binary_function pointer_to_unary_function pop pop_back pop_front pop_heap pow power precision prev_permutation printf ptr_fun push push_back push_front push_heap put putback putc putchar puts qsort raise rand random_sample random_sample_n random_shuffle range_error rbegin rdbuf rdstate read realloc reference remove remove_copy remove_copy_if remove_if rename rend replace replace_copy replace_copy_if replace_if reserve reset resize return_temporary_buffer reverse reverse_copy reverse_iterator rewind rfind rotate rotate_copy runtime_error scanf search search_n second seekg seekp set set_difference set_intersection set_symmetric_difference set_union setbuf setf setjmp setlocale setvbuf signal sin sinh size size_t size_type sort sort_heap splice sprintf sqrt srand sscanf stable_partition stable_sort std str strcat strchr strcmp strcoll strcpy strcspn strerror strftime string strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul strxfrm substr swap swap_ranges sync_with_stdio system tan tanh tellg tellp temporary_buffer test time time_t tmpfile tmpnam to_string to_ulong tolower top toupper transform unary_compose unary_negate underflow_error unget ungetc uninitialized_copy uninitialized_copy_n uninitialized_fill uninitialized_fill_n unique unique_copy unsetf upper_bound va_arg value_comp value_type vector vfprintf vprintf vsprintf width write +syn keyword cppSTL abort abs accumulate acos adjacent_difference adjacent_find adjacent_find_if any append asctime asin assign at atan atan2 atexit atof atoi atol auto_ptr back back_inserter bad bad_alloc bad_cast bad_exception bad_typeid badbit beg begin binary_compose binary_negate binary_search bind2nd binder1st binder2nd bitset bsearch c_str calloc capacity ceil cerr cin clear clearerr clock clog close compare compose1 compose2 const_iterator construct copy copy_backward copy_n cos cosh count count_if cout ctime data deque destroy difference_type difftime div divides domain_error empty end endl eof eofbit equal equal_range erase exception exit exp fabs fail failbit failure fclose feof ferror fflush fgetc fgetpos fgets fill fill_n find find_end find_first_not_of find_first_of find_if find_last_not_of find_last_of first flags flip floor flush fmod fopen for_each fprintf fputc fputs fread free freopen frexp front fscanf fseek fsetpos fstream ftell fwrite gcount generate generate_n get get_temporary_buffer getc getchar getenv getline gets gmtime good goodbit greater greater_equal hash_map hash_multimap hash_multiset hash_set ifstream ignore in includes inner_product inplace_merge insert inserter invalid_argument ios ios_base iostate iota is_heap is_open is_sorted isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace istream istream_iterator istringstream isupper isxdigit iter_swap iterator iterator_category key_comp ldiv length length_error less less_equal lexicographical_compare lexicographical_compare_3way list localtime log log10 logic_error logical_and logical_not logical_or longjmp lower_bound make_heap malloc map max max_element max_size mem_fun mem_fun1 mem_fun1_ref mem_fun_ref memchr memcpy memmove memset merge min min_element minus mismatch mktime modf modulus multimap multiplies multiset negate next_permutation npos nth_element numeric_limits ofstream open ostream ostream_iterator ostringstream out_of_range overflow_error pair make_pair partial_sort partial_sort_copy partial_sum partition peek perror plus pointer pointer_to_binary_function pointer_to_unary_function pop pop_back pop_front pop_heap pow power precision prev_permutation printf ptr_fun push push_back push_front push_heap put putback putc putchar puts qsort raise rand random_sample random_sample_n random_shuffle range_error rbegin rdbuf rdstate read realloc reference remove remove_copy remove_copy_if remove_if rename rend replace replace_copy replace_copy_if replace_if reserve reset resize return_temporary_buffer reverse reverse_copy reverse_iterator rewind rfind rotate rotate_copy runtime_error scanf search search_n second seekg seekp set set_difference set_intersection set_symmetric_difference set_union setbuf setf setjmp setlocale setvbuf signal sin sinh size size_t size_type sort sort_heap splice sprintf sqrt srand sscanf stable_partition stable_sort std str strcat strchr strcmp strcoll strcpy strcspn strerror strftime string strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul strxfrm substr swap swap_ranges sync_with_stdio system tan tanh tellg tellp temporary_buffer test time time_t tmpfile tmpnam to_string to_ulong tolower top toupper transform unary_compose unary_negate underflow_error unget ungetc uninitialized_copy uninitialized_copy_n uninitialized_fill uninitialized_fill_n unique unique_copy unsetf upper_bound va_arg value_comp value_type vector vfprintf vprintf vsprintf width write round initializer_list function -syn keyword cppStatement new delete this friend using assert +syn keyword cppStatement new delete this friend using syn keyword cppAccess public protected private -syn keyword cppType inline virtual explicit export bool wchar_t +syn keyword cppType inline virtual explicit export bool wchar_t size_t syn keyword cppExceptions throw try catch -syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" +syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\>" syn keyword cppStorageClass mutable syn keyword cppStructure class typename template namespace syn keyword cppNumber NPOS @@ -41,10 +41,12 @@ syn match cppEndline ";" " nojhan adhoc syn match cppTrailingSpace "\s*$" syn match cppMacro "\s*DBG[A-Z]*\s*(.*);$" -syn match cppOperator "\<\(ITEMS\|VERTICES\|EDGES\)\>" +syn keyword cppMacro assert +syn match cppOperator "\<\(ITEMS\|VERTICES\|EDGES\|ALL\)\>" syn match cppOperator "\" syn keyword cppOperator IN ROC - +syn match cppMember "\<_[a-zA-Z_][a-zA-Z_0-9]*\>" +syn keyword cppType auto " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" @@ -58,7 +60,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits") command -nargs=+ HiLink hi def link endif HiLink cppAccess cppStatement - HiLink cppCast cppStatement + HiLink cppCast cppType HiLink cppExceptions Exception HiLink cppOperator Operator HiLink cppEndline Operator diff --git a/.vimrc b/.vimrc index 57ecf4d..a11d85a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,8 +1,52 @@ +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +" alternatively, pass a path where Vundle should install plugins +"call vundle#begin('~/some/path/here') + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' + +" Keep Plugin commands between vundle#begin/end. +" plugin on GitHub repo +Plugin 'scrooloose/nerdtree' " left panel with file explorer: F11 or ,b +Plugin 'millermedeiros/vim-statline' " better buffer status line +Plugin 'ervandew/supertab' " completion with in insert mode +Plugin 'tomtom/tlib_vim' " utilities library for other plugins +Plugin 'tomtom/tcomment_vim' " easy comments: gcc or gc +Plugin 'tpope/vim-eunuch' " proxy to Linux commands, most notably :SudoWrite +Plugin 'tpope/vim-surround' " new moves: i (inside) and a (around) +Plugin 'oblitum/rainbow' " rainbow parentheses: ,r +" Plugin 'kien/rainbow_parentheses' " superseeded by rainbow +" Plugin 'sjl/gundo' " multiple path tree undo history +Plugin 'fholgado/minibufexpl' " bottom « tabs » flat list of opened buffers +Plugin 'majutsushi/tagbar' " right panel with functions/classes: ,é +" Plugin 'terryma/vim-multiple-cursors' " Not enough vimesque, either `Ctrl-V` or `:%s` are sufficient. +" Plugin 'airblade/vim-gitgutter' " Not enough useful compared to plain old `git diff`, at the end. +Plugin 'terryma/vim-expand-region' " expand/shrink the current visual selection: + and - +" Plugin 'tomtom/quickfixsigns_vim' " gutter with various symbols (too slow) +" Plugin 'vim-scripts/TaskList' +" Plugin 'kien/ctrlp' +" Plugin 'Valloric/YouCompleteMe' +" Plugin 'SirVer/ultisnips' +" Plugin 'honza/vim-snippets' +" Plugin 'jeaye/color_coded' +Plugin 'lervag/vimtex' +Plugin 'vim-scripts/a.vim' " alternate between header/code files: :A + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required + set nocompatible " do not try to be vi-compatible -call pathogen#infect() +" call pathogen#infect() +" set sessionoptions-=options " Because pathogen. -set guifont=Deja\ Vu\ Sans\ Mono\ 9 +set guifont=Deja\ Vu\ Sans\ Mono\ 12 syntax on " syntax coloring by default @@ -15,7 +59,6 @@ if &t_Co >= 256 && ! has("gui_running") colorscheme inkpot endif -set sessionoptions-=options " Because pathogen. set textwidth=120 set wrap " auto wrap line view, but not text itself @@ -74,6 +117,7 @@ set virtualedit=block set matchpairs+=<:> let mapleader = "," " leader key is comma +let maplocalleader = "\" " xx will delete the line without copying it into the default register nnoremap xx "_dd @@ -82,7 +126,7 @@ nnoremap t :set noexpandtab nnoremap T :set expandtab " Yank the line, comment it, paste it -nmap g yypgcc +nmap g yygccp " When jumping to a given line, center the screen nnoremap G Gzz @@ -117,6 +161,7 @@ nnoremap u :GundoToggle " remove all C/C++ comments and blank lines " nnoremap c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//:%s/^\s*\n// + nnoremap c :close nnoremap n :noh @@ -125,15 +170,29 @@ nnoremap n :noh nnoremap h :set guifont=Deja\ Vu\ Sans\ Mono\ 4 " set a normal guifont size -nnoremap f :set guifont=Deja\ Vu\ Sans\ Mono\ 9 +nnoremap f :set guifont=Deja\ Vu\ Sans\ Mono\ 12 " set a big guifont size -nnoremap ç :set guifont=Deja\ Vu\ Sans\ Mono\ 11 +nnoremap ç :set guifont=Deja\ Vu\ Sans\ Mono\ 16 " double percentage sign in command mode is expanded " to directory of current file - http://vimcasts.org/e/14 cnoremap %% =expand('%:h').'/' +" Put plugins and dictionaries in this dir (also on Windows) +let vimDir = '$HOME/.vim' +let &runtimepath.=','.vimDir + +" Keep undo history across sessions by storing it in a file +if has('persistent_undo') + let myUndoDir = expand(vimDir . '/undodir') + " Create dirs + call system('mkdir ' . vimDir) + call system('mkdir ' . myUndoDir) + let &undodir = myUndoDir + set undofile +endif + " Ctrl-P config let g:ctrlp_working_path_mode = 'ra' " search for files from the nearest ancestor that contains a VCS let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files'] " list only files versionned within GIT @@ -257,6 +316,8 @@ nnoremap é :TagbarToggle map :NERDTreeToggle nnoremap b :NERDTreeToggle " nnoremap t :NERDTreeToggle +" +" let NERDTreeSortOrder=['\.h$','\.hpp$','\.cpp$'] " NERDTress File highlighting function! NERDTreeHighlightFile(extension, fg) @@ -269,13 +330,13 @@ endfunction call NERDTreeHighlightFile('README', 'green') call NERDTreeHighlightFile('md' , 'green') " source files -call NERDTreeHighlightFile('c' , 'cyan') -call NERDTreeHighlightFile('cc' , 'cyan') -call NERDTreeHighlightFile('cpp', 'cyan') -call NERDTreeHighlightFile('mm' , 'cyan') +call NERDTreeHighlightFile('c' , 'lightmagenta') +call NERDTreeHighlightFile('cc' , 'lightmagenta') +call NERDTreeHighlightFile('cpp', 'lightmagenta') +call NERDTreeHighlightFile('mm' , 'lightmagenta') +call NERDTreeHighlightFile('hpp', 'lightblue') " headers -call NERDTreeHighlightFile('h' , 'lightmagenta') -call NERDTreeHighlightFile('hpp', 'lightmagenta') +call NERDTreeHighlightFile('h' , 'cyan') " shell scripts call NERDTreeHighlightFile('sh' , 'lightgreen') call NERDTreeHighlightFile('bash', 'lightgreen') @@ -283,6 +344,8 @@ call NERDTreeHighlightFile('bash', 'lightgreen') call NERDTreeHighlightFile('py' , 'yellow') " makefiles call NERDTreeHighlightFile('CMakeLists.txt', 'red') +call NERDTreeHighlightFile('Doxyfile.in', 'red') +call NERDTreeHighlightFile('Doxyfile', 'lightred') call NERDTreeHighlightFile('makefile' , 'lightred') call NERDTreeHighlightFile('Makefile' , 'lightred') @@ -334,3 +397,5 @@ nnoremap " nmap d :b#bd# " nmap :bc :b#bd# +let g:tex_flavor = 'latex' +nmap lt (vimtex-toc-toggle)