diff options
-rw-r--r-- | .bash_aliases | 16 | ||||
-rwxr-xr-x | .vimrc | 141 | ||||
-rw-r--r-- | .vimtabrc | 13 |
3 files changed, 170 insertions, 0 deletions
diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..57fdf63 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,16 @@ +# Set some custom alias +alias weather2='curl http://wttr.in' +alias fortune="fortune > ~/.last_fortune.txt; cat ~/.last_fortune.txt | cowsay; cat ~/.last_fortune.txt | espeak" +alias youtube-dl-album='youtube-dl -x --audio-format mp3 -o "~/Music/%(playlist)s/%(playlist_index)s-%(title)s.%(ext)s"' +alias youtube-dl-song='youtube-dl -x --audio-format mp3 -o "~/Music/%(title)s.%(ext)s"' +alias moon='curl http://wttr.in/Moon' +alias loopback="pacmd load-module module-loopback latency_msec=250" +alias unloopback="pacmd unload-module module-loopback" +alias rm="rm -i" +alias notes="vim ~/txt/notes-$(date +%F).md" +alias show="pandoc ~/txt/notes-$(date +%F).md > /tmp/output.html; firefox /tmp/output.html" +alias du="ncdu -rr" +alias backup='bash ~/Scripts/Bash/backup.sh' +alias vimtab='vim -c "so ~/.vimtabrc"' +alias dic='dict -d gcide' +alias ths='dict -d moby-thesaurus' @@ -0,0 +1,141 @@ +set nocompatible +filetype off + +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" Bundles +" Actual plugins +Plugin 'VundleVim/Vundle.vim' +Plugin 'tpope/vim-fugitive' +Plugin 'ctrlpvim/ctrlp.vim' +Plugin 'tpope/vim-surround' +Plugin 'tpope/vim-repeat' +Plugin 'editorconfig/editorconfig-vim' +Plugin 'gerw/vim-HiLinkTrace' +" Meta plugins +Plugin 'vim-scripts/ingo-library' +Plugin 'vim-scripts/SyntaxRange' +" Syntax highlighting +Plugin 'jparise/vim-graphql' +Plugin 'plasticboy/vim-markdown' +Plugin 'cespare/vim-toml' +Plugin 'rust-lang/rust.vim' +Plugin 'mxw/vim-jsx' +Plugin 'pangloss/vim-javascript' +Plugin 'kchmck/vim-coffee-script' +Plugin 'google/vim-jsonnet' +Plugin 'sirtaj/vim-openscad' +Plugin 'leafgarland/typescript-vim' +Plugin 'beyondmarc/glsl.vim' +Plugin 'vim-scripts/scons.vim' +Plugin 'calviken/vim-gdscript3' +Plugin 'wannesm/wmgraphviz.vim' +Plugin 'sotte/presenting.vim' +Plugin 'ziglang/zig.vim' +Plugin 'gpanders/vim-scdoc' +Plugin 'https://tildegit.org/sloum/gemini-vim-syntax' +" /Bundles + +call vundle#end() + +filetype plugin indent on + +set laststatus=2 +set t_Co=256 + +syntax enable + +set expandtab +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set autoindent +set encoding=utf-8 +set magic " unbreak vim's regex implementation + +set ruler +set cc=80 +set nowrap + +set ignorecase +set smartcase + +set splitbelow +set hidden +set notimeout + +set number +set cursorline +set wildmenu +set lazyredraw +set showmatch +set nofoldenable + +set incsearch +set showmatch +set hlsearch + +set listchars=tab:>ยท,trail:~ +set list + + +" Resize windows and move tabs and such with the mouse +"set mouse=a + +" Don't litter swp files everywhere +set backupdir=~/.cache +set directory=~/.cache + + +syntax on +let mapleader = "\<space>" +nnoremap \\ :noh<cr> " Clear higlighting +nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR> " Trim trailing spaces +nnoremap Y y$ +nnoremap cc :center<cr> +inoremap <C-c> <ESC> +" no Ex mode +nnoremap Q <Nop> + +" Preferences for various file formats +autocmd FileType c setlocal noet ts=8 sw=8 tw=80 +autocmd FileType h setlocal noet ts=8 sw=8 tw=80 +autocmd FileType cpp setlocal noet ts=8 sw=8 tw=80 +autocmd FileType s setlocal noet ts=8 sw=8 +autocmd FileType go setlocal noet ts=4 sw=4 +autocmd FileType hy setlocal filetype=lisp +autocmd FileType sh setlocal noet ts=4 sw=4 +autocmd BufRead,BufNewFile *.js setlocal et ts=2 sw=2 +autocmd FileType html setlocal et ts=2 sw=2 +autocmd FileType htmldjango setlocal et ts=2 sw=2 +autocmd FileType ruby setlocal et ts=2 sw=2 +autocmd FileType scss setlocal et ts=2 sw=2 +autocmd FileType yaml setlocal et ts=2 sw=2 +autocmd FileType markdown setlocal tw=80 et ts=2 sw=2 +autocmd FileType text setlocal tw=80 +autocmd FileType meson setlocal noet ts=2 sw=2 +autocmd FileType bzl setlocal et ts=2 sw=2 +autocmd FileType typescript setlocal et ts=2 sw=2 +autocmd FileType python setlocal et ts=4 sw=4 +autocmd BufNewFile,BufRead *.ms set syntax=python ts=4 sw=4 noet +autocmd FileType tex hi Error ctermbg=NONE +autocmd FileType mail setlocal noautoindent +autocmd FileType gmi set wrap linebreak +augroup filetypedetect + autocmd BufRead,BufNewFile *mutt-* setfiletype mail +augroup filetypedetect + autocmd BufRead,BufNewFile *qutebrowser-editor-* set ts=4 sw=4 et +autocmd BufNewFile,BufRead * if expand('%:t') == 'APKBUILD' | set ft=sh | endif +autocmd BufNewFile,BufRead * if expand('%:t') == 'PKGBUILD' | set ft=sh | endif + +let g:presenting_top_margin = 2 + +set wildignore+=*/node_modules/* " MacOSX/Linux + +command Wq wq +command WQ wq +command W w +command Q q +nnoremap Q <nop> + diff --git a/.vimtabrc b/.vimtabrc new file mode 100644 index 0000000..2a48c5e --- /dev/null +++ b/.vimtabrc @@ -0,0 +1,13 @@ +set number +setlocal noexpandtab +setlocal shiftwidth=20 +setlocal softtabstop=20 +setlocal tabstop=20 +set nowrap +set scrollopt=hor +set scrollbind +sp +set lines=1 +wincmd j +set lines=37 + |