Compare commits

..

2 Commits

Author SHA1 Message Date
af4e2d4364 pylab 2023-12-21 08:06:55 +01:00
5b12de7672 vimrc: YCM only if python3 enabled 2023-12-20 12:47:22 +01:00
5 changed files with 24 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ source_existing ~/.bash_prompt.kuba
source_existing ~/.python-venv.kuba/bin/activate source_existing ~/.python-venv.kuba/bin/activate
if command -v ipython &> /dev/null; then if command -v ipython &> /dev/null; then
alias p=ipython alias p="ipython --pylab"
elif command -v python &> /dev/null; then elif command -v python &> /dev/null; then
alias p=python alias p=python
fi fi

View File

@@ -108,3 +108,18 @@ pdftoclipboard() {
pdftoppm -png -r "$dpi" "$file" | xclip -sel clip -t image/png -i pdftoppm -png -r "$dpi" "$file" | xclip -sel clip -t image/png -i
} }
gitgrepsed() {
if [ $# -lt 2 ]; then
echo "Usage gitgrepsed SEARCH REPLACE
Search and replace in git repository.
Alias for git grep -l \$SEARCH | xargs sed -i "s/\$SEARCH/\$REPLACE/g"
"
return
fi
search="$1"
replace="$2"
git grep -l "$search" | xargs sed -i "s/$search/$replace/g"
}

View File

@@ -7,5 +7,6 @@ local loadscript = pathJoin(path, '.' .. myModuleName() .. '.sh');
execute{cmd='source ' .. loadscript, modeA={"load"}} execute{cmd='source ' .. loadscript, modeA={"load"}}
execute{cmd='unset -f npz_preview npz_previewi ' .. execute{cmd='unset -f npz_preview npz_previewi ' ..
'rsync_wrap rsync_wrap_huge selc selv cliipc clipv watch_modify pdftoclipboard' .. 'rsync_wrap rsync_wrap_huge selc selv cliipc clipv watch_modify pdftoclipboard gitgrepsed' ..
'rsync_wrap rsync_wrap_huge selc selv cliipc clipv watch_modify' ..
';', modeA={"unload"}} ';', modeA={"unload"}}

View File

@@ -15,13 +15,8 @@ Host aino
User jakub User jakub
Port 22209 Port 22209
Host tahoe
HostName tahoe.fy.chalmers.se
User jakub
Port 22209
Host sharknado Host sharknado
HostName 130.239.81.182 HostName 130.238.29.144
User ubuntu User ubuntu
IdentityFile ~/.ssh/jupyterhub_rsa IdentityFile ~/.ssh/jupyterhub_rsa

5
.vimrc
View File

@@ -36,6 +36,7 @@ if filereadable(expand(vundle_dir) . "/README.md")
Plugin 'tell-k/vim-autopep8' Plugin 'tell-k/vim-autopep8'
Plugin 'jpalardy/vim-slime' Plugin 'jpalardy/vim-slime'
Plugin 'preservim/tagbar' Plugin 'preservim/tagbar'
Plugin 'wellle/context.vim'
call vundle#end() " required call vundle#end() " required
else else
@@ -343,6 +344,10 @@ nmap <F2> :NERDTreeToggle<CR>
nmap <F3> :NERDTreeFind<CR> nmap <F3> :NERDTreeFind<CR>
map <F5> :call CurtineIncSw()<CR> map <F5> :call CurtineIncSw()<CR>
let g:context_enabled = 0
map <F6> :ContextToggle<CR>
map cp :ContextPeek<CR>
" Julialang " Julialang
let g:latex_to_unicode_auto = 1 let g:latex_to_unicode_auto = 1