mirror of
https://github.com/tiyn/dotfiles.git
synced 2026-03-19 14:44:46 +01:00
moving server dotfiles to branch of dotfiles
This commit is contained in:
52
.config/aliasrc
Normal file
52
.config/aliasrc
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
# bash
|
||||
alias ":wq"="exit"
|
||||
alias ":q"="exit"
|
||||
|
||||
# cd
|
||||
alias ".."="cd .."
|
||||
alias "..."="cd ../.."
|
||||
alias "...."="cd ../../.."
|
||||
alias "....."="cd ../../../.."
|
||||
alias "......"="cd ../../../../.."
|
||||
alias "dockervol"="cd /var/lib/docker/volumes"
|
||||
|
||||
# clear
|
||||
alias c="clear"
|
||||
|
||||
# config
|
||||
alias config="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
|
||||
|
||||
# grep
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
# haste
|
||||
haste() {
|
||||
a=$(cat);
|
||||
curl -X POST -s -d "$a" https://paste.tiyn.eu/documents | awk -F '"' '{print "https://paste.tiyn.eu/"$4}';
|
||||
}
|
||||
|
||||
# ls(d)
|
||||
alias l="lsd"
|
||||
alias la="lsd -la"
|
||||
alias ll="lsd -l"
|
||||
alias tree="lsd --tree"
|
||||
|
||||
# mkdir
|
||||
alias mkdir="mkdir -p"
|
||||
|
||||
# mount
|
||||
alias mount="mount |column -t"
|
||||
|
||||
# ping
|
||||
alias ping="ping -c 5"
|
||||
|
||||
# sc-im
|
||||
alias sc="sc-im"
|
||||
|
||||
# script
|
||||
alias scriptclear="cat typescript | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > typescript-processed"
|
||||
|
||||
# nvim
|
||||
command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d"
|
||||
80
.config/nvim/init.vim
Normal file
80
.config/nvim/init.vim
Normal file
@@ -0,0 +1,80 @@
|
||||
" Begin Plugin section
|
||||
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
|
||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||
silent !mkdir -p ~/.config/nvim/autoload/
|
||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
|
||||
endif
|
||||
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'qpkorr/vim-renamer'
|
||||
Plug 'tomasiser/vim-code-dark'
|
||||
call plug#end()
|
||||
|
||||
" End Plugin section
|
||||
|
||||
let mapleader =","
|
||||
|
||||
set go=a
|
||||
set mouse=a
|
||||
set ignorecase
|
||||
" Some basics:
|
||||
nnoremap c "_c
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set number relativenumber
|
||||
" Enable autocompletion:
|
||||
set wildmode=longest,list,full
|
||||
" Disables automatic commenting on newline:
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
" Setting Tab-length
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
|
||||
colorscheme codedark
|
||||
|
||||
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||||
set splitbelow splitright
|
||||
|
||||
" Mapping Dictionaries
|
||||
map <F5> :setlocal spell! spelllang=de<CR>
|
||||
map <F6> :set spelllang=en_us<CR>
|
||||
|
||||
""" Shortcuts
|
||||
" Navigating with guides
|
||||
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
map <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
|
||||
" Navigating with guides
|
||||
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
map <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||
|
||||
"""HTML
|
||||
autocmd BufRead,BufNewFile *.html set filetype=html
|
||||
|
||||
autocmd FileType html inoremap ,b <b></b><Space><++><Esc>FbT>i
|
||||
autocmd FileType html inoremap ,it <em></em><Space><++><Esc>FeT>i
|
||||
autocmd FileType html inoremap ,1 <h1></h1><Enter><Enter><++><Esc>2kf<i
|
||||
autocmd FileType html inoremap ,2 <h2></h2><Enter><Enter><++><Esc>2kf<i
|
||||
autocmd FileType html inoremap ,3 <h3></h3><Enter><Enter><++><Esc>2kf<i
|
||||
autocmd FileType html inoremap ,p <p></p><Enter><Enter><++><Esc>02kf>a
|
||||
autocmd FileType html inoremap ,a <a<Space>href=""><++></a><Space><++><Esc>14hi
|
||||
autocmd FileType html inoremap ,e <a<Space>target="_blank"<Space>href=""><++></a><Space><++><Esc>14hi
|
||||
autocmd FileType html inoremap ,ul <ul><Enter><li></li><Enter></ul><Enter><Enter><++><Esc>03kf<i
|
||||
autocmd FileType html inoremap ,li <Esc>o<li></li><Esc>F>a
|
||||
autocmd FileType html inoremap ,ol <ol><Enter><li></li><Enter></ol><Enter><Enter><++><Esc>03kf<i
|
||||
autocmd FileType html inoremap ,im <img src="" alt="<++>"><++><esc>Fcf"a
|
||||
autocmd FileType html inoremap &<space> &<space>
|
||||
autocmd FileType html inoremap ä ä
|
||||
autocmd FileType html inoremap ö ö
|
||||
autocmd FileType html inoremap ü ü
|
||||
autocmd FileType html inoremap Ä Ä
|
||||
autocmd FileType html inoremap Ö Ö
|
||||
autocmd FileType html inoremap Ü Ü
|
||||
|
||||
" Delete trailing whitespaces on save
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
Reference in New Issue
Block a user