dotfiles

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

commit 43238c983a45a29af35989145297fb7953525d43
parent b7d106da8d3abca7c21de01c403628d119275b7d
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Fri, 21 Nov 2014 10:13:10 +0100

Merge branch 'master' of https://github.com/anders-dc/dotfiles

Diffstat:
M.Xresources | 11+++++++----
M.i3/config | 8++++++--
A.tmuxinator/dev.yml | 40++++++++++++++++++++++++++++++++++++++++
M.vimrc | 116++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
Abin/mount-usb.sh | 2++
Abin/umount-usb.sh | 2++
6 files changed, 163 insertions(+), 16 deletions(-)

diff --git a/.Xresources b/.Xresources @@ -60,8 +60,11 @@ URxvt.keysym.C-0: command:\033]710;xft:PragmataPro:size=20\007\033]711;xft:Pragm !URxvt.keysym.C-9: command:\033]710;-*-termsynu-medium-r-*-*-13-*-*-*-*-*-*-*\007\033]711;-*-termsynu-medium-r-*-*-13-*-*-*-*-*-*-*\007 !URxvt.keysym.C-0: command:\033]710;-*-termsynu-medium-r-*-*-14-*-*-*-*-*-*-*\007\033]711;-*-termsynu-medium-r-*-*-14-*-*-*-*-*-*-*\007 -! looks good with DejaVi Sans Mono: -URxvt.letterSpace: -1 +! looks good with DejaVu Sans Mono: +!URxvt.letterSpace: -1 + +! looks good with PragmataPro +URxvt.letterSpace: -2 !urxvt*font: -*-lemon-*-*-*-*-*-*-*-*-*-*-*-* !urxvt*boldFont: -*-lemon-*-*-*-*-*-*-*-*-*-*-*-* @@ -77,8 +80,8 @@ URxvt.letterSpace: -1 !urxvt*boldfont: -*-termsynu-bold-r-*-*-13-*-*-*-*-*-*-* !urxvt*font: xft:DejaVu Sans Mono for Powerline:size=8 !urxvt*boldfont: xft:DejaVu Sans Mono for Powerline:size=8 -urxvt*font: xft:PragmataPro:size=8 -urxvt*boldfont: xft:PragmataPro:size=8:style=Bold +urxvt*font: xft:PragmataPro:size=9 +urxvt*boldfont: xft:PragmataPro:size=9:style=Bold !urxvt*boldfont: xft:DejaVu Sans Mono Bold for Powerline:size=8 ! shading: 0-99 darkens, 101-200 lightens diff --git a/.i3/config b/.i3/config @@ -9,9 +9,13 @@ # # Please see http://i3wm.org/docs/userguide.html for a complete reference! +# Super as modifier set $mod Mod4 +set $alt Mod1 + +# Alt as modifier #set $mod Mod1 -#set $alt Mod1 +#set $alt Control # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. ISO 10646 = Unicode @@ -73,7 +77,7 @@ bindsym $mod+b exec firefox bindsym $mod+c exec emacs bindsym $mod+t exec tor-browser.sh bindsym $mod+p exec zathura -bindsym $mod+Mod1+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && notify-send `cat ~/.kbd-layout` +bindsym $mod+$alt+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && notify-send `cat ~/.kbd-layout` # volume control with pulseaudio #bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 -- +10% && killall -SIGUSR1 i3status diff --git a/.tmuxinator/dev.yml b/.tmuxinator/dev.yml @@ -0,0 +1,40 @@ +# ~/.tmuxinator/dev.yml + +name: dev +root: ~/code/sphere-cfd + +# Optional tmux socket +# socket_name: foo + +# Runs before everything. Use it to start daemons etc. +# pre: sudo /etc/rc.d/mysqld start + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +windows: + - dev: vim + - debug: + layout: even-horizontal + panes: + - git pull && cmake . && make && make test + - watch nvidia-smi + - run: + layout: main-vertical + panes: + - cd python && ipython -i -c 'import sphere' + - cd python + - cd python + - log: cd python + + - grendel: + layout: even-horizontal + panes: + - ssh grendel.cscaa.dk + - ssh grendel.cscaa.dk diff --git a/.vimrc b/.vimrc @@ -86,6 +86,20 @@ NeoBundle 'msanders/snipmate.vim' " vim motion on speed NeoBundle 'Lokaltog/vim-easymotion' +" Take notes in rst +NeoBundle 'Rykka/clickable.vim' +NeoBundle 'Rykka/riv.vim' +NeoBundle 'Rykka/InstantRst' + +" add/remove bookmark: mm +" add/edit/remove annotation: mi +" next bookmark: mn +" previous bookmark: mn +" list of all bookmarks: ma +" clear all bookmarks in current buffer: mc +" clear all bookmarks in all buffers: mx +NeoBundle 'MattesGroeger/vim-bookmarks' + " vimproc for asynchronous processes NeoBundle 'Shougo/vimproc.vim', { \ 'build' : { @@ -116,6 +130,10 @@ call togglebg#map("<F3>") "let g:airline_theme = 'ubaryd' let g:airline_theme = 'solarized' "let g:airline_theme = 'tomorrow' +highlight Search cterm=NONE ctermfg=black ctermbg=2 +highlight MatchParen cterm=NONE ctermfg=255 ctermbg=199 +highlight SpecialKey ctermfg=250 ctermbg=NONE cterm=NONE +highlight NonText ctermfg=250 ctermbg=NONE " hilight column 80 set textwidth=80 @@ -232,13 +250,12 @@ highlight SpecialKey ctermfg=10 guifg=DarkGray nmap ZX :w<CR> " use , instead of \ as leader -let mapleader="," +"let mapleader="," " use space instead of \ as leader let mapleader="\<Space>" " Shortcut to reload .vimrc nmap <leader>r :source $MYVIMRC<CR> -nmap <leader>C :e $MYVIMRC<CR> " Shortcut to switch background color "nmap <leader>w :ToggleBG<CR> @@ -253,7 +270,7 @@ nmap <Leader>q :q<CR> nmap <Leader>x :x<CR> " Explore buffers -nmap <leader>b :BufExplorer<CR> +nmap <leader>B :BufExplorer<CR> " toggle spelling nmap <leader>s :set spell!<CR> @@ -262,7 +279,7 @@ nmap <leader>s :set spell!<CR> nmap <leader>n :set number!<CR> " toggle relative line numbering -nmap <leader>m :set relativenumber!<CR> +nmap <leader>N :set relativenumber!<CR> " NERD Tree short cut nmap <leader>d :NERDTreeToggle<CR> @@ -270,14 +287,19 @@ nmap <leader>d :NERDTreeToggle<CR> " Toggle TAB and EOL symbols nmap <leader>l :set list!<CR> -nmap <leader>T :e ~/doc/todo.org<CR> +nmap <leader>e :e nmap <leader>% :vsplit nmap <leader>" :split +" shortcuts to commonly used files +nmap <leader>C :e $MYVIMRC<CR> +nmap <leader>T :e ~/doc/todo.org<CR> +nmap <leader>B :e ~/articles/own/BIBnew.bib<CR> + " vimproc -nmap <leader>e :VimProcBang nmap <leader>E :VimProcRead -nmap <leader>c :VimProcBang make -k + +nmap <leader>m :Make<CR> nmap <leader>g :Gcommit<CR> @@ -287,6 +309,16 @@ nmap <leader>j <C-w>j nmap <leader>k <C-w>k nmap <leader>l <C-w>l +" Toggle fold +nmap <leader>f za +" Toggle all folds +nmap <leader>F zA +" zc: close a fold +" zo: open a fold +" za: toggle a fold +" zM: close all folds +" zR: open all folds + " Switch split focus with <C-h>, <C-j>, <C-k> and <C-l> "map <C-h> <C-w>h "map <C-j> <C-w>j @@ -310,16 +342,80 @@ imap <Down> <Nop> set tags=tags;/ " Update ctags -nmap <leader>t :!ctags -R --python-kinds=-i --langmap=c++:.cu,c++:.cuh .<CR> +nmap <leader>c :!ctags -R --python-kinds=-i --langmap=c++:.cu,c++:.cuh .<CR> " useful tags commands: " :tag or :ta <function> Go to definition of the function " :ts or :tselect Show the list of tags " When the cursor is on a function call, press <Ctrl-[> to go to its definition. " Press <Ctrl-t> to go back " Use the Ctrl-P plugin to search the tags -nmap <leader>P :CtrlPTag<CR> -nmap <leader>p :CtrlPBuffer<CR> +nmap <leader>t :CtrlPTag<CR> +nmap <leader>b :CtrlPBuffer<CR> nmap <leader>o :CtrlPMRUFiles<CR> " Launch Ack nmap <leader>a :Ack + +" reStructuredText bindings +augroup filetypedetect_rst + au! + " Headings + " Use <C-e>s1 to <C-e>s4 in insert mode + " Use <C-e>hs to view document sections + " Use <C-e>cc to insert table of contents + "au FileType rst nnoremap <leader>h1 ^yypv$r=o<cr><esc> + "au FileType rst inoremap <leader>h1 <esc>^yypv$r=o<cr> + "au FileType rst nnoremap <leader>h2 ^yypv$r-o<cr><cr><cr><cr><cr><cr><esc>kkkk + "au FileType rst inoremap <leader>h2 <esc>^yypv$r-o<cr><cr><cr><cr><cr><cr><esc>kkkki + "au FileType rst nnoremap <leader>h3 ^yypv$r+o<cr><cr><cr><cr><cr><cr><esc>kkkk + "au FileType rst inoremap <leader>h3 <esc>^yypv$r+o<cr><cr><cr><cr><cr><cr><esc>kkkki + "au FileType rst nnoremap <leader>h4 ^yypv$r~o<cr><cr><cr><cr><cr><cr><esc>kkkk + "au FileType rst inoremap <leader>h4 <esc>^yypv$r~o<cr><cr><cr><cr><cr><cr><esc>kkkki + "au FileType rst nnoremap <leader>h5 ^yypv$r*o<cr><cr><cr><cr><cr><cr><esc>kkkk + "au FileType rst inoremap <leader>h5 <esc>^yypv$r*o<cr><cr><cr><cr><cr><cr><esc>kkkki + + " On list lines, press <C-e>ee to toggle state + + """Make Link (ml) + " Use <C-e>ck to make a link + " Highlight a word or phrase and it creates a link and opens a split so + " you can edit the url separately. Once you are done editing the link, + " simply close that split. + au FileType rst vnoremap <leader>ml yi`<esc>gvvlli`_<esc>:vsplit<cr><C-W>l:$<cr>o<cr>.. _<esc>pA: http://TODO<esc>vb + + """Make footnote (ml) + au FileType rst iabbrev mfn [#]_<esc>:vsplit<cr><C-W>l:$<cr>o<cr>.. [#] TODO + " Enable spelling by default + au FileType rst set spell + + "Create image + au FileType rst iabbrev iii .. image:: TODO.png<cr> :scale: 100<cr>:align: center<cr><esc>kkkeel + + "Create figure + "au FileType rst iabbrev iif .. figure:: TODO.png<cr> :scale: 100<cr>:align: center<cr>:alt: TODO<cr><cr><cr>Some brief description<esc>kkkeel + + "Create note + au FileType rst iabbrev nnn .. note:: + + "Start or end bold text inline + "au FileType rst inoremap <leader>bb ** + + "Start or end italicized text inline + "au FileType rst inoremap <leader>ii * + + "Start or end preformatted text inline + "au FileType rst inoremap <leader>pf `` + + " Fold settings + "au FileType rst set foldmethod=marker + " + " Admonitions + au FileType rst iabbrev adw .. warning:: + au FileType rst iabbrev adn .. note:: + +augroup END + +" adjust signcolumn appearance +let g:syntastic_error_symbol = 'e' +let g:syntastic_warning_symbol = 'w' +highlight clear SignColumn diff --git a/bin/mount-usb.sh b/bin/mount-usb.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sudo mount /dev/sdb1 /media/usb && echo 'mounted in /media/usb. Umount with umount-usb.sh' diff --git a/bin/umount-usb.sh b/bin/umount-usb.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sudo umount /media/usb