diff --git a/Xresources b/Xresources index b0a266d..c4bdc64 100644 --- a/Xresources +++ b/Xresources @@ -21,19 +21,19 @@ URxvt*lineSpace: 0 URxvt*skipBuiltinGlyphs: true ! Fonts -URxvt*font: xft:Fira Mono:style=Regular:size=11, \ +URxvt*font: xft:Hack:style=Regular:size=11, \ xft:Droid Sans Fallback:style=Regular, \ xft:Droid Sans Japanese:style=Regular, \ xft:unifont:style=Medium -URxvt*boldFont: xft:Fira Mono:style=Bold:size=11, \ +URxvt*boldFont: xft:Hack:style=Bold:size=11, \ xft:Droid Sans Fallback:style=Regular, \ xft:Droid Sans Japanese:style=Regular, \ xft:unifont:style=Medium -URxvt*italicFont: xft:Fira Mono:style=Regular:size=11, \ +URxvt*italicFont: xft:Hack:style=Regular:size=11, \ xft:Droid Sans Fallback:style=Regular, \ xft:Droid Sans Japanese:style=Regular, \ xft:unifont:style=Medium -URxvt*boldItalicFont: xft:Fira Mono:style=Bold:size=11, \ +URxvt*boldItalicFont: xft:Hack:style=Bold:size=11, \ xft:Droid Sans Fallback:style=Regular, \ xft:Droid Sans Japanese:style=Regular, \ xft:unifont:style=Medium diff --git a/vim/cheetsheet.md b/vim/cheetsheet.md new file mode 100644 index 0000000..a65d7e2 --- /dev/null +++ b/vim/cheetsheet.md @@ -0,0 +1,44 @@ +# VIM CHEETSHEET + +Generel stuff that I need to get into my muscle memory. + +* `C-W [hjkl]` - switch to window left, above, below, right +* `C-L` - clear highlight + +## yanking +* `"ay` - replace content of register 'a' +* `"Ay` - append to content of register 'a' +* `y` - will put stuff in the default register `""` and `"0` +* `d` - will put stuff just in the default register `""` - so `"0p` will still + paste the last yank +* `3yy` - yank next three lines +* `C-r +` - paste register '+' in insert mode +* `"*` - linux the PRIMARY clipboard, system clipboard on other operating + systems +* `"+` - the system clipboard on all operating systems + + +## unimpared +* `]b` - :bnext +* `[b` - :bprevious +* `]B` - :bfirst +* `[B` - :blast + +## surround +* `cs"'` - changes surrouding " to ' + +## Grepper + +* `g` - kick off +* without entering anything, takes word under the cursor + +## GitGutter + +* `]c`, `[c` - jump to next/prev hunk (*c*hange) +* `hs` - stage hunk +* `hu` - undo hunk + +## Debugging + +* `DD` - start profiling +* `DP` - pause profiling, output in `profile.log` diff --git a/vimrc b/vimrc index d3670c1..d9cdd84 100644 --- a/vimrc +++ b/vimrc @@ -1,60 +1,55 @@ " vim: set fenc=utf-8 ft=vim fdm=marker fmr={{{,}}}: -" file: ~/.vimrc -" author: Thomas Ruoff (with the help of a myriad others) +" author: Thomas Ruoff " Plugins {{{ call plug#begin('~/.vim/plugged') Plug 'tpope/vim-sensible' +Plug 'tpope/vim-unimpaired' +Plug 'tpope/vim-surround' -Plug 'vim-scripts/L9' -Plug 'vim-scripts/unimpaired.vim' -Plug 'vim-scripts/surround.vim' -Plug 'vim-scripts/Align' -Plug 'Raimondi/delimitMate' +" Plug 'Raimondi/delimitMate' +" project config Plug 'editorconfig/editorconfig-vim' - Plug 'tpope/vim-projectionist' -Plug 'maralla/completor.vim', { 'do': 'make js'} - +" navigating in project +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' +Plug 'mhinz/vim-grepper' Plug 'ludovicchabant/vim-gutentags' -Plug 'nathanaelkane/vim-indent-guides' +" linting +Plug 'w0rp/ale' +" completion +Plug 'maralla/completor.vim', { 'do': 'make js'} + +" git related +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-rhubarb' +Plug 'airblade/vim-gitgutter' + +" appearence +Plug 'itchyny/lightline.vim' +Plug 'morhetz/gruvbox' + +" filetypes +Plug 'sheerun/vim-polyglot' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -Plug 'w0rp/ale' - -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-rhubarb' -Plug 'rhysd/conflict-marker.vim' -Plug 'airblade/vim-gitgutter' - -Plug 'inside/vim-search-pulse' - -Plug 'itchyny/lightline.vim' - -Plug 'morhetz/gruvbox' - +" javascript Plug 'pangloss/vim-javascript' Plug 'marijnh/tern_for_vim', { 'do': 'npm install' } Plug 'mxw/vim-jsx' +" previews Plug 'suan/vim-instant-markdown', { 'for': 'markdown' } Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' - -Plug 'mhinz/vim-grepper' - -Plug 'sheerun/vim-polyglot' - -Plug 'christoomey/vim-tmux-navigator' - +" debug Plug 'tweekmonster/startuptime.vim' " Investigate on custom text object, seems really usefull @@ -66,8 +61,6 @@ call plug#end() " }}} " Basics {{{ -set nocompatible - set hidden set ttyfast set synmaxcol=512 @@ -84,6 +77,10 @@ set wildignore+=*.swp,*.bak,*.jpg,*.gif,*.png,*.git, set splitright set splitbelow +" yank delete change and put operations go by default in `"+` register +" so in the systems clipboard accessable by CTRL-V on all OS types +set clipboard=unnamedplus + " set ignorecase set infercase set smartcase @@ -118,16 +115,19 @@ set secure " Text Formatting {{{ set list + set breakindent set showbreak=↳ -set tabstop=4 -set softtabstop=4 -set shiftwidth=4 -set expandtab set textwidth=79 set colorcolumn=80 set nojoinspaces + +set tabstop=8 +set softtabstop=4 +set shiftwidth=4 +set expandtab + " }}} " Folding {{{ @@ -151,14 +151,10 @@ set undoreload=10000 " Visual Setting {{{ " -set background=dark set cursorline colorscheme gruvbox set number -if exists('+relativenumber') - set relativenumber -endif " }}} " GUI Settings {{{ @@ -181,20 +177,6 @@ inoremap jj "" fast saving nnoremap w :update -"" remove hightlighting -nnoremap :nohls - -"" fast window switching -nnoremap -nnoremap -nnoremap -nnoremap - -"" open next,prev buffer, cycle -noremap . :bn -noremap m :bp -noremap : :b# - "" delete buffer noremap bd :bd @@ -202,30 +184,14 @@ noremap bd :bd vnoremap > >gv vnoremap < - "" Visually select the text that was last edited/pasted nnoremap gV `[v`] "" fast editing of the .vimrc nnoremap ev :e $MYVIMRC -"" turn on spell checking -noremap spl :setlocal spell! -"" spell checking shortcuts -noremap sn ]s -noremap sp [s -noremap sa zg -noremap s? z= - -"" toggle states -nnoremap hh :set invhlsearch -nnoremap ll :set invlist -nnoremap pp :set invpaste - -nnoremap nn :set invnumber -nnoremap ii :set invrelativenumber +"" cheetsheet +nnoremap ec :e ~/.vim/cheetsheet.md " debugging, use leader-DD to start, do a slow action, then leader-DQ to " finish. Your output will be in profile.log @@ -253,8 +219,13 @@ iab xnow =strftime("%Y-%m-%d %H:%M") let g:EditorConfig_core_mode = 'python_external' let g:EditorConfig_exclude_patterns = ['fugitive://.*'] -"" gutentags +"" vim-grepper +nnoremap g :Grepper -tool rg +let g:grepper = {} +let g:grepper.tools = ['rg', 'git', 'ag', 'grep'] + +"" gutentags let g:gutentags_cache_dir="~/.tags" let g:gutentags_file_list_command = { \ 'markers': { @@ -296,8 +267,13 @@ if filereadable(expand("~/.vim/lightline.vim")) augroup END endif -"" Indent Guides -nnoremap ig :IndentGuidesToggle +"" Unimpaired +"" bubble single lines +nnoremap k [e +nnoremap j ]e +"" bubble multiple lines +vnoremap k [egv +vnoremap j ]egv "" Ultisnips let g:UltiSnipsExpandTrigger="" @@ -326,9 +302,9 @@ let g:jsx_ext_required = 0 " Autocmd Rules {{{ -"" do syntax highlight syncing from start augroup general autocmd! + "" do syntax highlight syncing from start autocmd BufEnter * :syntax sync fromstart autocmd FileType netrw setl bufhidden=delete augroup END @@ -339,16 +315,10 @@ augroup text autocmd FileType text,markdown,mail,tex set wrap wm=2 nocindent spell augroup END -"" Python -augroup python - autocmd FileType python set noexpandtab -augroup END - "" JavaScript augroup web autocmd! autocmd FileType javascript map r :TernRename - autocmd BufRead,BufNewFile *.json set ft=json autocmd BufRead,BufNewFile *.template set filetype=html.mustache syntax=mustache augroup END diff --git a/xinitrc b/xinitrc index 8836673..2816430 100755 --- a/xinitrc +++ b/xinitrc @@ -11,27 +11,15 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then unset f fi -pulseaudio --start eval $(gpg-agent -s --enable-ssh-support --daemon --write-env-file $HOME/.gpg-agent-info) xrdb $HOME/.Xresources -# add additional fonts -xset +fp /usr/share/fonts/local -xset fp rehash - - -echo $1 > ~/.xinitrc-arg - case $1 in xterm) exec xterm ;; herbstluftwm) # default is herbstluftwm - xbindkeys -n & - urxvtd & - udiskie --tray & - systemctl --user start xautolock exec herbstluftwm --locked ;; *)