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

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

View File

@@ -1,8 +1,8 @@
" 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
map <C-c><C-c> <Esc>:!clear; go run %<Enter>
map <C-c><C-b> <Esc>:!clear; go build %; ./%<<Enter>
map <C-c><C-c> <Esc>:!clear; go run %<CR>
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 %

View File

@@ -6,5 +6,5 @@
" Begin Shortcuts
" 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-d> <Esc>:silent exec "!evince <C-r>%<Del><Del>pdf &>/dev/null &"<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>:!evince <C-r>%<Del><Del>pdf &>/dev/null & disown <CR>

View File

@@ -2,10 +2,10 @@
" Shortcuts
imap <leader>ifm if<Space>__name__<Space>==<Space>'__main__':<Enter>
imap <leader>ifm if<Space>__name__<Space>==<Space>'__main__':<CR>
" 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.
highlight BadWhitespace ctermbg=red guibg=red

View File

@@ -1,3 +1,3 @@
" 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> <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 "" "`"'<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 ;ssec \subsection{}<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> - | fmt -csw78
" Compilation
noremap <C-c><C-c> <Esc>:RunBackgroundCommand latexmk -pdf -silent "<C-r>%"<Enter>:redraw!<Enter>
noremap <C-c><C-v> <Esc>:RunBackgroundCommand latexmk -c<Enter>
noremap <C-c><C-d> <Esc>:silent exec "!evince <C-r>%<Del><Del><Del>pdf &>/dev/null &"<Enter>
noremap <C-c><C-c> <Esc>:!latexmk -pdf -silent "<C-r>%" &>/dev/null & disown <CR>:redraw!<CR>
noremap <C-c><C-v> <Esc>:!latexmk -c &>/dev/null & disown <CR>
noremap <C-c><C-d> <Esc>:!evince <C-r>%<Del><Del><Del>pdf &>/dev/null & disown <CR><CR>