From 7a72bb18991abac2ca6c7d8b93b346f2e7230c3b Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 30 Sep 2013 09:49:46 +0200 Subject: [PATCH] vim and bash --- Utils/octopus.sh | 5 ++++ bashrc | 7 ++++++ dwm/config.h | 1 + vim/skeletons/skel.latex | 1 + vim/spell/fr.utf-8.add | 1 + vim/spell/fr.utf-8.add.spl | Bin 243 -> 260 bytes vim/vimrc | 47 ++++++++++++++----------------------- 7 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index c28a55b..dbcdd2a 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -41,6 +41,11 @@ case $1 in --output VGA1 --auto --rotate normal \ --right-of LVDS1 ;; + "pdfpc") + xrandr --output LVDS1 --auto --rotate normal \ + --output VGA1 --auto --rotate normal \ + --left-of LVDS1 + ;; "clone") xrandr --output LVDS1 --auto \ --output VGA1 --auto --same-as LVDS1 diff --git a/bashrc b/bashrc index 0f31258..3da257f 100644 --- a/bashrc +++ b/bashrc @@ -356,6 +356,13 @@ function calc() echo "scale=3;$@" | bc -l } +function xournal() { + if [ -e "$1".xoj ]; then + /usr/bin/xournal "$1".xoj + else + /usr/bin/xournal "$1" + fi +} # }}} diff --git a/dwm/config.h b/dwm/config.h index 013714a..2a5d81a 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -27,6 +27,7 @@ static const Rule rules[] = { { "Gimp", NULL, NULL, 0, True, -1 }, { "Firefox", NULL, NULL, 1 << 0, False, -1 }, { "Thunderbird", NULL, NULL, 1 << 1, False, -1 }, + { "pdfpc", "pdfpc", NULL, 0, True, -1 }, }; /* layout(s) */ diff --git a/vim/skeletons/skel.latex b/vim/skeletons/skel.latex index 31a33cf..77deb0a 100644 --- a/vim/skeletons/skel.latex +++ b/vim/skeletons/skel.latex @@ -9,6 +9,7 @@ \begin{document} \maketitle +%\setcounter{section}{42} \section{<+SECTION+>} \subsection{<+SUBSECTION+>} <+CONTENT+> diff --git a/vim/spell/fr.utf-8.add b/vim/spell/fr.utf-8.add index a79c70f..577526f 100644 --- a/vim/spell/fr.utf-8.add +++ b/vim/spell/fr.utf-8.add @@ -16,3 +16,4 @@ encrypt alu EDF RDV +subsection diff --git a/vim/spell/fr.utf-8.add.spl b/vim/spell/fr.utf-8.add.spl index 4a16763b6922a6c8e0ff4aeb6afbba11c40102ab..6cee9b08e6e6027941eb18b4e6a21a1dbaa45f22 100644 GIT binary patch delta 70 zcmey&*uumY=IL8pkeZWY^q+x&VctZ(Njl6KC8dn{jHQf>3=Ek$j75xzjCqXdAYN!H VV-jOAV=7}ZV+n{anmKW|1pupj5mW#G delta 53 zcmZo+`pn1|=IL8pkeZWY^q+x&Vd6x-NzzOiC5-uurHqUW44FBMMU07zd5q~GUTEsX GGZp}zgbq6Z diff --git a/vim/vimrc b/vim/vimrc index 54f760e..18aae29 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -3,9 +3,15 @@ execute pathogen#infect() syntax on +color desert + +hi clear SpellBad +hi SpellBad cterm=underline,bold ctermfg=lightblue + +set spell +set spelllang=en,fr + -"set spelllang=en,fr -"set spell "set nocompatible "fuck you !. impossible de backspace, sinon set backspace=indent,eol,start @@ -14,8 +20,8 @@ set backspace=indent,eol,start set number set ts=8 "Un tab, huit espaces set noexpandtab "On veut pas remplacer tab -> espace -"set mouse=a set wrap "Une grande ligne continue à la ligne +"set mouse=a set hlsearch "On souligne les mots cherchés set incsearch "recherche peu à peu @@ -23,10 +29,8 @@ set ignorecase set foldmethod=marker + set cul "souligner la ligne actuelle - -color desert - set cursorline hi CursorLine term=bold cterm=bold guibg=Grey40 @@ -51,14 +55,6 @@ hi User5 guifg=#eeee40 guibg=#222222 "filetype plugin indent on -"noremap "" -"noremap! -"noremap "" -"noremap! -"noremap "" -"noremap! -"noremap "" -"noremap! " noremap @@ -70,26 +66,16 @@ command W w map w map W -"inoremap { {} -"inoremap { {}O -"inoremap {{ { -"inoremap /* /**/ -"inoremap /* /**/ -"inoremap /* /* */O -"inoremap // // set list -"set listchars=tab:▸\ ,eol:¬ -"set listchars=tab:>-,trail:.,eol:¬ -"set listchars=tab:▸-,trail:.,eol:¬ - set listchars=tab:\|\-"Cool for ifs/whiles set listchars+=trail:· "For eol with spaces set listchars+=eol:↲ "To show eol;not very useful with trail, but cool anyway :p set listchars+=nbsp:⍽ "For unbreakeable spaces + set history=500 set undolevels=500 @@ -100,14 +86,14 @@ set smartindent set copyindent set preserveindent -"highlight identic words +"highlight identical words autocmd CursorMoved * \ exe printf('match IncSearch /\V\<%s\>/', escape(expand(''), '/\')) -"Highlight in red lines longer than 80 chars -"""autocmd BufWinEnter * call matchadd('ErrorMsg', '\%>80v.\+', -1) +" lines longer than 80 chars {{{ set cc=80 hi ColorColumn ctermbg=lightblue guibg=lightgrey +" }}} @@ -116,7 +102,7 @@ map :make "TIPS : :copen :cclose :cw -"SKELETONS +"SKELETONS {{{ " When editing a new file, load skeleton if any. " If we find <+FILENAME+> in skeleton, replace it by the filename. @@ -138,15 +124,16 @@ autocmd BufNewFile * \ endif | \ unlet skel | \ goto 1 - " skeleton template use <+KEY+> nnoremap § /<+.\{-1,}+>c/+>/e inoremap § /<+.\{-1,}+>c/+>/e +" }}} "Automatic line wrap/br when writing mails in mutt au BufRead /dev/shm/mutt-* set tw=80 fo+=aw noautoindent + "Automatic documentation autocmd BufNewFile,BufRead *.py set keywordprg=pydoc autocmd BufNewFile,BufRead *.php set keywordprg=~/.vim/scripts/doc.php.sh