Added golang filetype to ranger, Enter->CR in vimconfigs

clean_emacs
TuDatTr 2020-01-04 08:42:48 +01:00
parent 77e03694cb
commit 5c0c9da67a
8 changed files with 23 additions and 19 deletions

View File

@ -37,8 +37,8 @@ ext x?html?, has w3m, terminal = w3m "$@"
# Define the "editor" for text files as first action # Define the "editor" for text files as first action
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
mime ^text, label pager = "$PAGER" -- "$@" mime ^text, label pager = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ${VISUAL:-$EDITOR} -- "$@" !mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ${VISUAL:-$EDITOR} -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = "$PAGER" -- "$@" !mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = "$PAGER" -- "$@"
ext 1 = man "$1" ext 1 = man "$1"
ext s[wmf]c, has zsnes, X = zsnes "$1" ext s[wmf]c, has zsnes, X = zsnes "$1"
@ -57,6 +57,7 @@ ext js = node -- "$1"
ext sh = sh -- "$1" ext sh = sh -- "$1"
ext php = php -- "$1" ext php = php -- "$1"
ext rs = rs -- "$1" ext rs = rs -- "$1"
ext go = go -- "$1"
#-------------------------------------------- #--------------------------------------------
# Audio without X # Audio without X
@ -199,9 +200,9 @@ label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
# Define the editor for non-text files + pager as last action # Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ask !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ${VISUAL:-$EDITOR} -- "$@" label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ${VISUAL:-$EDITOR} -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = "$PAGER" -- "$@" label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = "$PAGER" -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program: # The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1" mime application/x-executable = "$1"

View File

@ -5,7 +5,7 @@ m:/run/media/tuan
a:/home/tuan/Documents/Arbeit a:/home/tuan/Documents/Arbeit
l:/home/tuan/Local l:/home/tuan/Local
c:/home/tuan/Documents/CTF/picoCTF c:/home/tuan/Documents/CTF/picoCTF
':/home/tuan/workspace_l/Projects/Python/Scrapers/missing_dex ':/home/tuan/.vim/ftplugin
t:/home/tuan/Templates t:/home/tuan/Templates
w:/home/tuan/workspace_l/Projects w:/home/tuan/workspace_l/Projects
k:/home/tuan/Documents/Fachschaft/Berufungskomission k:/home/tuan/Documents/Fachschaft/Berufungskomission

View File

@ -1,8 +1,8 @@
" Shortcuts " Shortcuts
imap ;main package main<Enter><Enter>import (<Enter>"fmt"<Enter>)<Enter><Enter>func main() {<Enter>}<Esc>O imap ;main package main<CR><CR>import (<CR>"fmt"<CR>)<CR><CR>func main() {<CR>}<Esc>O
" Compiling " Compiling
map <C-c><C-c> <Esc>:!clear; go run %<Enter> map <C-c><C-c> <Esc>:!clear; go run %<CR>
map <C-c><C-b> <Esc>:!clear; go build %; ./%<<Enter> map <C-c><C-b> <Esc>:!clear; go build %; ./%<<CR>
map <C-c><C-w> <Esc>:!clear; GOOS=windows GOARCH=386 go build -o %<.exe % map <C-c><C-w> <Esc>:!clear; GOOS=windows GOARCH=386 go build -o %<.exe %

View File

@ -6,5 +6,5 @@
" Begin Shortcuts " Begin Shortcuts
" Compilation " Compilation
map <C-c><C-c> <Esc>:RunBackgroundCommand pandoc <C-r>% --pdf-engine=xelatex -o <C-r>%<Del><Del>pdf<Enter> map <C-c><C-c> <Esc>:!pandoc <C-r>% --pdf-engine=xelatex -o <C-r>%<Del><Del>pdf &>/dev/null & disown <CR>
map <C-c><C-d> <Esc>:silent exec "!evince <C-r>%<Del><Del>pdf &>/dev/null &"<Enter> map <C-c><C-d> <Esc>:!evince <C-r>%<Del><Del>pdf &>/dev/null & disown <CR>

View File

@ -2,10 +2,10 @@
" Shortcuts " Shortcuts
imap <leader>ifm if<Space>__name__<Space>==<Space>'__main__':<Enter> imap <leader>ifm if<Space>__name__<Space>==<Space>'__main__':<CR>
" Compiling " Compiling
map <C-c><C-c> <Esc>:!clear; python %<Enter> map <C-c><C-c> <Esc>:!clear; python %<CR>
" Use the below highlight group when displaying bad whitespace is desired. " Use the below highlight group when displaying bad whitespace is desired.
highlight BadWhitespace ctermbg=red guibg=red highlight BadWhitespace ctermbg=red guibg=red

View File

@ -1,3 +1,3 @@
" Compilation " Compilation
map <C-c><C-c> <Esc>:!clear&./%<Enter> map <C-c><C-c> <Esc>:!clear&./%<CR>

View File

@ -4,10 +4,10 @@ setlocal spell spelllang=de_de
noremap <C-B> YpkI\begin{<Esc>A}<Esc>jI\end{<Esc>A}<Esc>ko noremap <C-B> YpkI\begin{<Esc>A}<Esc>jI\end{<Esc>A}<Esc>ko
noremap! <C-B> <Esc>YpkI\begin{<Esc>A}<Esc>jI\end{<Esc>A}<Esc>ko noremap! <C-B> <Esc>YpkI\begin{<Esc>A}<Esc>jI\end{<Esc>A}<Esc>ko
inoremap ;it \begin{itemize}<Enter>\end{itemize}<Esc>k inoremap ;it \begin{itemize}<CR>\end{itemize}<Esc>k
inoremap ;i \item{}<Space> inoremap ;i \item{}<Space>
inoremap "" "`"'<Esc>hha inoremap "" "`"'<Esc>hha
inoremap ;fp \begin{tabular}{ccc}<Enter>\toprule<Enter>Ja & Nein & Enthaltung \\ <Enter> \midrule<Enter> <x_x> & <x_x> & <x_x> \\<Enter>\bottomrule<Enter>\end{tabular}<Esc>0kk<Space><Tab> inoremap ;fp \begin{tabular}{ccc}<CR>\toprule<CR>Ja & Nein & Enthaltung \\ <CR> \midrule<CR> <x_x> & <x_x> & <x_x> \\<CR>\bottomrule<CR>\end{tabular}<Esc>0kk<Space><Tab>
inoremap ;sec \section{}<Esc>i inoremap ;sec \section{}<Esc>i
inoremap ;ssec \subsection{}<Esc>i inoremap ;ssec \subsection{}<Esc>i
inoremap ;sssec \subsubsection{}<Esc>i inoremap ;sssec \subsubsection{}<Esc>i
@ -24,7 +24,7 @@ vnoremap "" da"`<C-R>""'<Esc>
":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - ":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> -
":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - | fmt -csw78 ":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - | fmt -csw78
" Compilation " Compilation
noremap <C-c><C-c> <Esc>:RunBackgroundCommand latexmk -pdf -silent "<C-r>%"<Enter>:redraw!<Enter> noremap <C-c><C-c> <Esc>:!latexmk -pdf -silent "<C-r>%" &>/dev/null & disown <CR>:redraw!<CR>
noremap <C-c><C-v> <Esc>:RunBackgroundCommand latexmk -c<Enter> noremap <C-c><C-v> <Esc>:!latexmk -c &>/dev/null & disown <CR>
noremap <C-c><C-d> <Esc>:silent exec "!evince <C-r>%<Del><Del><Del>pdf &>/dev/null &"<Enter> noremap <C-c><C-d> <Esc>:!evince <C-r>%<Del><Del><Del>pdf &>/dev/null & disown <CR><CR>

View File

@ -23,5 +23,8 @@ plugins=(
# History # History
HISTORY_IGNORE='sudo veracrypt *|veracrypt *' HISTORY_IGNORE='sudo veracrypt *|veracrypt *'
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null;fi;}
# Source # Source
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh