dot

packages and services management
Log | Files | Refs | README

commit f10249e552aa1738b9842e65b629a4fed709ac6f
parent 35e876452ca43b1b3e45de16719c2666509eb06a
Author: sshbio <jd@ssh.bio>
Date:   Mon,  1 Aug 2016 19:41:32 +0200

vim: You are old... Good, but bloated too! I still like you

Diffstat:
MREADME | 2++
Minstall.sh | 6+++++-
Mshell/.profile | 5++++-
Avim/.vimrc | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 156 insertions(+), 2 deletions(-)

diff --git a/README b/README @@ -4,6 +4,8 @@ http://ssh.bio jd@ssh.bio / __/ __/ __ \/ __ \/\/ __ \ __\ \_\ \/ / / / /_/ / / /_/ / \___/___/_/ /_/\____/\/\____/ 's dotfiles +================================================================================ + Install -------------------------------------------------------------------------------- diff --git a/install.sh b/install.sh @@ -43,7 +43,10 @@ case "$1" in fi done ;; -*) printf '%s\n' " +-v ) + sed '/' "$pwd/README" + ;; +* ) printf '%s\n' " SYNTAX $pwd/install.sh [ OPTION ] @@ -52,5 +55,6 @@ OPTIONS -m Prompt for e-mail password to save in a unsafe text file. -l Link the dotfiles from subdirectories of: $Config -s Link the sub-sub-directories of: $Sync + -v Install asyncronously the vim plugins " ;; esac diff --git a/shell/.profile b/shell/.profile @@ -6,6 +6,7 @@ #/ ____/ \/ \____/ \/ \/ \/ \___\ - Variables & shell config #\/============================================================================= + export EMAIL='jd@ssh.bio' export LS_COLORS='so=35:tw=91:ow=93' export NCURSES_NO_UTF8_ACS=1 # Fix for dvtm + abduco in TTY @@ -13,7 +14,9 @@ export NCURSES_NO_UTF8_ACS=1 # Fix for dvtm + abduco in TTY # Commands -export EDITOR='vis' +for editor in vi vim vis +do command -v $editor > /dev/null && export EDITOR="$editor" +done export ALTERNATE_EDITOR='vi' export DVTM_EDITOR="$EDITOR" export VISUAL="$EDITOR" diff --git a/vim/.vimrc b/vim/.vimrc @@ -0,0 +1,145 @@ +" __ +" __ /\ \/ ________ _____ ____ +" / / / / /\ / __ __ \ / ____\/ ___\ +" \ \/ / / // / / / / // / / /__ +" \_.' \/ \/ \/ \/ \/ \____\ - without plugins if possible +"=============================================================================== + + +" Settings +"------------------------------------------------------------------------------- + +set nocompatible + +" Appearance +colorscheme default +colorscheme sshbio +set list listchars=tab:\|\ ,trail:_,extends:>,precedes:<,nbsp:_ +set fillchars=vert:\|,fold:_ + +" Interface +set wildmenu wildmode=longest:full,full " Wild +set showcmd showmode laststatus=2 ruler " Verbose interface +set colorcolumn=80 cursorline scrolloff=5 " Lines & columns indicators +set visualbell + +" Code +filetype indent plugin on +syntax on +set omnifunc=syntaxcomplete#Complete " Completion +"set formatoptions=t,c,r,q,a,n,b,j +set smarttab shiftwidth=8 tabstop=8 " Tabs +set autoindent smartindent " Indentation +set textwidth=0 formatprg=fmt " Formatting + +" Search +set ignorecase smartcase " Case +set showmatch incsearch " Highlights +set nolazyredraw + +" Backups and undos +set undodir=~/.vim/tmp undofile +set backupdir=~/.vim/tmp,. +set directory=~/.vim/tmp,. + + +" Plugins +"------------------------------------------------------------------------------- + +execute pathogen#infect() + + +" Keys +"------------------------------------------------------------------------------- + +let mapleader = ' ' +inoremap jk <esc> + +" Occur +nnoremap g/ :vimgrep /<C-R>//j %<CR>\|:cw<CR> + +" Insert spaces +nnoremap [<space> O<esc>j<c-e> +nnoremap ]<space> o<esc>k + +" Exchange lines +nnoremap [e ddkP +nnoremap ]e ddp + + +" Options + +nnoremap cov :if &ve == '' \| se ve=all \| else \| se ve= \| endif<cr>:se ve<cr> +nnoremap co- :set cursorline! \| set cursorline? <cr> +nnoremap co<bar> :set cursorcolumn! \| set cursorcolumn? <cr> +nnoremap coh :set hlsearch! \| set hlsearch? <cr> +nnoremap coi :set ignorecase! \| set ignorecase? <cr> +nnoremap col :set list! \| set list? <cr> +nnoremap con :set number! \| set number? <cr> +nnoremap cop :set paste! \| set paste? <cr> +nnoremap cor :set relativenumber! \| set relativenumber?<cr> +nnoremap cos :set spell! \| set spell? <cr> +nnoremap cow :set wrap! \| set wrap? <cr> + + +" Menu + +nnoremap <leader> : +nnoremap <leader><leader> :pwd \| tabs \| echo '' \| buffers \| echo ''<cr>: +nnoremap <leader>b :pwd \| echo ' ' \| buffers \| echo ' '<cr>:b +nnoremap <leader>t :pwd \| tabs \| echo ' '<cr>:tab +nnoremap <leader>T :pwd \| echo ' ' \| tags \| echo ' '<cr>:tag +nnoremap <leader>' :pwd \| echo ' ' \| marks \| echo ' '<cr> +nnoremap <leader>" : echo ' ' \| registers \| echo ' '<cr> +nnoremap <leader>u : echo ' ' \| undolist \| echo ' '<cr>:undo +nnoremap <leader>U :UndotreeToggle \| UndotreeFocus <cr> +nnoremap <leader>e :pwd \| echo ' ' \| buffers \| echo ' '<cr>:e +nnoremap <leader>f :pwd \| echo ' ' <cr>:find +nnoremap <leader>c :pwd \| echo ' ' \| clist \| echo ' '<cr>:c +nnoremap <leader>w :w <cr> + + +" Macros + +" Comment column (50) and equal column (30) +nnoremap <leader><tab> mzD:set ve=all<cr>050lhP:set ve=<cr>`z +nnoremap <leader><cr> mzD:set ve=all<cr>030lhP:set ve=<cr>`z + +" Square a block with ascii/unicode border +vnoremap <leader>s mzomwOmxomy<esc>`xj<c-v>`zkr<bar>`wj<c-v>`ykr<bar>`xr.h<c-v>`wr-r.`zr'h<c-v>`yr-r' + +" Execute normal command over visual selection +nnoremap <leader>r :'<,'>g/^/norm + +" Playback the current macro, go to the first letter of the next line +nnoremap <leader>j @qj^ +nnoremap <leader>J @qk^ + +" Extract to another file +vnoremap <leader>x "md:enew<cr>"mp + +" Re align the whole file +nnoremap <leader>= ggVG= + + +" Abbreviations +"------------------------------------------------------------------------------- + +" Rulers +iab __ <space><esc>:set ve=all<cr>v080lhr_:set ve=<cr>A +iab -_ <space><esc>:set ve=all<cr>v080lhr-:set ve=<cr>A +iab =_ <space><esc>:set ve=all<cr>v080lhr=:set ve=<cr>A +iab {1 <esc>:set ve=all<cr>lv080l5hr_:set ve=<cr>3A{<esc>VUA1 +iab {2 <esc>4a{<esc>r2bD:set ve=all<cr>080l5hp:set ve=<cr>VUA + +" Header +iab ^_ <esc>0D!!fig-slash '<c-f>pA'<cr>V5j:s/ *$<cr> + + +" Autocommands +"------------------------------------------------------------------------------- + +augroup templates + autocmd! + autocmd BufNewFile *.* silent! exe '0r' . g:vimdir . '/templates/' . &ft +augroup END