BashRC: Fixed a htop issue while using a different TERM var. VimRC: Added a personal wiki tooling.

Signed-off-by: Hermann Mayer's avatarHermann Mayer <hermann.mayer92@gmail.com>
parent 692c33a9
......@@ -82,14 +82,6 @@ if [ -f "${BASHRC_CONFIG}/exports.conf" ]; then
source "${BASHRC_CONFIG}/exports.conf"
fi
# +-------------------------------------------------
# | Addons
# +-------------------------------------------------
if [ -f "${BASHRC_CONFIG}/addons.sh" ]; then
source "${BASHRC_CONFIG}/addons.sh"
fi
# +-------------------------------------------------
# | Non-Interactive Shell
# +-------------------------------------------------
......@@ -120,9 +112,9 @@ fi
# | UTF8 Stuff
# +-------------------------------------------------
export LC_ALL=de_DE.UTF-8
export LANG=de_DE.UTF-8
export LANGUAGE=de_DE.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
if test -t 1 -a -t 2 ; then
echo -n -e '\033%G'
......@@ -150,6 +142,14 @@ do
fi
done
# +-------------------------------------------------
# | Addons
# +-------------------------------------------------
if [ -f "${BASHRC_CONFIG}/addons.sh" ]; then
source "${BASHRC_CONFIG}/addons.sh"
fi
# +-------------------------------------------------
# | Binding Bash Events
# +-------------------------------------------------
......
67cf578d-a0ba-4bec-91c7-7e856bc0e9af
\ No newline at end of file
#!/bin/bash
export PATH="${PATH}:`ls -d1 ${HOME}/.gem/ruby/*/bin | paste -sd ':'`"
html2haml --erb --ruby19-attributes --stdin
......@@ -220,6 +220,25 @@ if 1 == VimRCBundlesMisc
call camelcasemotion#CreateMotionMappings('<leader>')
" +-----------------------------------------------
" | VimWiki
" +-----------------------------------------------
let g:vimwiki_list = [{
\ 'path': '/data/projects/Coding/Hausgold/Docs/wiki/',
\ 'path_html': '/data/projects/Coding/Hausgold/Docs/html/',
\ 'auto_toc': 1,
\ 'syntax': 'markdown',
\ 'ext': '.md',
\ 'custom_wiki2html': 'vimwiki_markdown',
\ 'html_filename_parameterization': 1
\ }]
let g:vimwiki_key_mappings = { 'table_mappings': 0 }
let g:vimwiki_global_ext = 0
let g:vimwiki_url_maxsave = 0
let g:vimwiki_conceallevel = 0
let conceallevel = 0
endif
" +-----------------------------------------------
......@@ -331,6 +350,7 @@ if 1 == VimRCBundlesDevel
\ ['red', 'firebrick3' ] ,
\]
" All the swap words
let g:switch_custom_definitions = [
\ ['min', 'max'] ,
\ ['MIN', 'MAX'] ,
......@@ -376,7 +396,7 @@ if 1 == VimRCBundlesDevel
\ ['Up', 'Down'] ,
\ ['up', 'down'] ,
\ ['padding', 'margin'] ,
\ ['pick', 'squash', 'fixup', 'edit', 'reword', 'exec'] ,
\ ['pick', 'fixup', 'squash', 'edit', 'reword', 'exec'] ,
\ ['if', 'unless'] ,
\ ['request', 'response'],
\ ['Request', 'Response'],
......@@ -390,7 +410,7 @@ if 1 == VimRCBundlesDevel
\ ['public', 'private'],
\ ['Public', 'Private'],
\ ['context', 'describe', 'xcontext', 'xdescribe'],
\ ['it', 'xit'],
\ ['it', 'xit', 'fit'],
\ ['header', 'footer'],
\ ['Header', 'Footer'],
\ ['with', 'without'],
......@@ -405,6 +425,11 @@ if 1 == VimRCBundlesDevel
\ ['when', 'with', 'without'],
\ ['select', 'reject'],
\ ['create', 'build', 'attributes_for'],
\ ['CANARY', 'PRODUCTION'],
\ ['blank?', 'present?'],
\ ['any?', 'all?', 'none?', 'one?'],
\ ['local', 'canary', 'production'],
\ ['path', 'file'],
\]
autocmd VimEnter * :IndentGuidesEnable
......
......@@ -77,6 +77,8 @@ if 1 == VimRCBundlesMisc
Plugin 'triglav/vim-visual-increment'
" Advanced URI/Browser handling instead of a broken netrw/gx
Plugin 'tyru/open-browser.vim'
" A personal wiki organizer
Plugin 'vimwiki/vimwiki'
endif
if 1 == VimRCBundlesDevel
......@@ -116,6 +118,8 @@ if 1 == VimRCBundlesDevel
Plugin 'elixir-editors/vim-elixir'
" Switching between a single-line statement and a multi-line one
Plugin 'AndrewRadev/splitjoin.vim'
" Vim support for Cheat.sh
Plugin 'dbeniamine/cheat.sh-vim'
endif
if 1 == VimRCBundlesHTML
......
......@@ -99,7 +99,7 @@ function InsertCmd(cmd, closure)
let l = substitute(l, '\n$', a:closure, '')
let l = a:closure . l
echo l
exe "normal a".l
exe "normal i".l
redraw!
endfunction
......
......@@ -75,20 +75,22 @@ imap <F5> <ESC><i}<CR>i
" Reformat the buffer
map <F7> mzgg=G`z<CR>
map <leade>pf <ESC>:%!$HOME/.vim/tools/php-pretty.php<CR><CR>
map <leader>jm <ESC>:%!$HOME/.vim/tools/json-pretty.js -m<CR><CR>
vmap <leader>jsf <ESC>:'<,'>!js-beautify -b expand -B -f -<CR><CR>
map <leader>jf <ESC>:execute "%!$HOME/.vim/tools/json-pretty.js " . &shiftwidth<CR><CR>
xnoremap <leader>jf c<C-R>=system("$HOME/.vim/tools/json-pretty.js " . &shiftwidth, @")<CR><ESC>
map <leader>xx <ESC>:silent %!$HOME/.vim/tools/xml-format.rb<CR><CR>
xnoremap <leader>xx <ESC>:'<,'>:!$HOME/.vim/tools/xml-format.rb<CR>
map <leader>jm <ESC>:%!$HOME/.vim/tools/json-pretty.js -m<CR><CR>
map <leade>pf <ESC>:%!$HOME/.vim/tools/php-pretty.php<CR><CR>
" map <leader>jf <ESC>:%!python $HOME/.vim/tools/json-tool.py<CR>
" map <leader>jf <ESC>:%!python -mjson.tool<CR>
map <leader>xf <ESC>:silent %!tidy -xml -i --quiet true --indent-attributes true<CR>
xnoremap <leader>xf <ESC>:'<,'>:!tidy -xml -i --quiet true --indent-attributes true<CR>
vmap <leader>jsf <ESC>:'<,'>!js-beautify -b expand -B -f -<CR><CR>
map <leader>hf <ESC>:execute "%!$HOME/.vim/tools/html2haml"<CR><CR>
xnoremap <leader>hf <ESC>:'<,'>:!$HOME/.vim/tools/html2haml<CR>
" Add UUIDv4
nnoremap <leader>iu m'A<C-R>=InsertCmd('uuidgen', "'")<CR><CR><Esc>``
nnoremap <leader>iu :call InsertCmd('uuidgen', '')<CR>
" Strip trailing whitespaces
map <leader>sw <ESC>:call TrimWhiteSpace()<CR><CR>
......@@ -315,4 +317,5 @@ nmap gs <Plug>(openbrowser-search)
" Search selected word
vmap gs <Plug>(openbrowser-search)
" Create an alternative file on a Ruby project
" Open a new cheat.sh buffer for the current line
nmap <Leader>aa <ESC><Leader>KB<CR>:sleep 200m<CR><c-w>j<ESC>:call TrimWhiteSpace()<CR><CR>
......@@ -54,7 +54,7 @@ hi DiffChange ctermbg=237
hi IndentGuidesOdd guibg=#1B1B1B ctermbg=232
hi IndentGuidesEven guibg=#303030 ctermbg=235
" hi NonText ctermfg=252 ctermbg=234 cterm=none guifg=#AE0000 guibg=#242424 gui=none
hi NonText ctermfg=252 ctermbg=NONE guifg=#AE0000 guibg=#242424 gui=none
"hi CursorIM
hi! link Directory Number
......@@ -101,4 +101,8 @@ hi! link FoldColumn Folded
hi! link CursorColumn CursorLine
hi! link NonText LineNr
" Transparent background on terminal
hi Normal ctermbg=NONE
hi nonText ctermbg=NONE guibg=#181818
" vim:set ts=4 sw=4 noet:
......@@ -13,7 +13,7 @@ alias ....="cd ../../.."
alias .....="cd ../../../.."
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -hs | sort -rn'
alias c='clear'
alias h='htop'
alias h='TERM=rxvt htop'
alias f='free -m'
alias mplayer='mplayer -cache 16000 -lavdopts fast:skiploopfilter=all:threads=2 '
alias ls='ls $COLOR_OPTIONS --group-directories-first --time-style="+%F, %T "'
......
......@@ -9,7 +9,20 @@
function unixtimetodate()
{
date -u -d "@${1}"
args="${@}"
if [ -n "${args}" ]; then
for line in $@; do
date -u -d "@${line}"
done
return
fi
if [ ! -t 0 ]; then
while read line; do
date -u -d "@${line}"
done < /dev/stdin
fi
}
function datediff()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment