vim: simplify; zsh: remove simplify emptytrash; gitconfig: add pull

This commit is contained in:
2020-06-08 12:10:32 +02:00
parent c6e960f08f
commit 9dcf1075de
3 changed files with 7 additions and 84 deletions

View File

@@ -77,6 +77,9 @@
[merge] [merge]
log = true log = true
[pull]
rebase = false
[push] [push]
default = simple default = simple

86
vimrc
View File

@@ -6,17 +6,6 @@ set history=700
" Set to auto read when a file is changed from the outside " Set to auto read when a file is changed from the outside
set autoread set autoread
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","
" Leader key timeout
set tm=2000
" Allow the normal use of "," by pressing it twice
noremap ,, ,
" Use par for prettier line formatting " Use par for prettier line formatting
set formatprg="PARINIT='rTbgqR B=.,?_A_a Q=_s>|' par\ -w72" set formatprg="PARINIT='rTbgqR B=.,?_A_a Q=_s>|' par\ -w72"
@@ -40,13 +29,8 @@ Bundle 'gmarik/vundle'
Bundle 'scrooloose/syntastic' Bundle 'scrooloose/syntastic'
" Other programming languages " Other programming languages
"Bundle 'zepto-lang/zepto-vim'
Bundle 'hellerve/carp-vim' Bundle 'hellerve/carp-vim'
Bundle 'junegunn/goyo.vim' Bundle 'junegunn/goyo.vim'
"Bundle 'tikhomirov/vim-glsl'
"Plugin 'rust-lang/rust.vim'
"Plugin 'isRuslan/vim-es6'
"Plugin 'JuliaEditorSupport/julia-vim'
" Extra " Extra
Plugin 'editorconfig/editorconfig-vim' Plugin 'editorconfig/editorconfig-vim'
@@ -111,9 +95,6 @@ if &term =~ '256color'
set t_ut= set t_ut=
endif endif
" Force redraw
map <silent> <leader>r :redraw!<CR>
" Default to mouse mode on " Default to mouse mode on
set mouse=a set mouse=a
" }}} " }}}
@@ -140,9 +121,6 @@ set encoding=utf8
" Use Unix as the standard file type " Use Unix as the standard file type
set ffs=unix,dos,mac set ffs=unix,dos,mac
" Use large font by default in MacVim
set gfn=Monaco:h19
" }}} " }}}
" Files, backups and undo {{{ " Files, backups and undo {{{
@@ -152,21 +130,6 @@ set nobackup
set nowb set nowb
set noswapfile set noswapfile
" Source the vimrc file after saving it
augroup sourcing
autocmd!
autocmd bufwritepost .vimrc source $MYVIMRC
augroup END
" Open file prompt with current path
nmap <leader>e :e <C-R>=expand("%:p:h") . '/'<CR>
" Fuzzy find files
nnoremap <silent> <Leader><space> :CtrlP<CR>
let g:ctrlp_max_files=0
let g:ctrlp_show_hidden=1
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](.git)$' }
" }}} " }}}
" Text, tab and indent related {{{ " Text, tab and indent related {{{
@@ -174,16 +137,16 @@ let g:ctrlp_custom_ignore = { 'dir': '\v[\/](.git)$' }
" Use spaces instead of tabs " Use spaces instead of tabs
set expandtab set expandtab
" Be smart when using tabs ;) " Be smart when using tabs
set smarttab set smarttab
" 1 tab == 2 spaces " 1 tab == 2 spaces
set shiftwidth=2 set shiftwidth=2
set tabstop=2 set tabstop=2
" Linebreak on 500 characters " Linebreak on 80 characters
set lbr set lbr
set tw=500 set tw=80
set ai "Auto indent set ai "Auto indent
set si "Smart indent set si "Smart indent
@@ -191,15 +154,6 @@ set wrap "Wrap lines
" }}} " }}}
" Visual mode related {{{
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :call VisualSelection('f', '')<CR>
vnoremap <silent> # :call VisualSelection('b', '')<CR>
" }}}
" Moving around, tabs, windows and buffers {{{ " Moving around, tabs, windows and buffers {{{
" Treat long lines as break lines (useful when moving around in them) " Treat long lines as break lines (useful when moving around in them)
@@ -222,9 +176,6 @@ augroup END
" Remember info about open buffers on close " Remember info about open buffers on close
set viminfo^=% set viminfo^=%
" don't close buffers when you aren't displaying them
set hidden
" }}} " }}}
" Status line {{{ " Status line {{{
@@ -300,37 +251,6 @@ augroup END
" }}} " }}}
" Helper functions {{{
function! CmdLine(str)
exe "menu Foo.Bar :" . a:str
emenu Foo.Bar
unmenu Foo
endfunction
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", '\\/.*$^~[]')
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'b'
execute "normal ?" . l:pattern . "^M"
elseif a:direction == 'gv'
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
elseif a:direction == 'f'
execute "normal /" . l:pattern . "^M"
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
" }}}
let g:syntastic_carp_checkers = ['carp'] let g:syntastic_carp_checkers = ['carp']
command Cr !carp -x % command Cr !carp -x %

2
zshrc
View File

@@ -56,7 +56,7 @@ alias pip="pip3"
alias setjdk="launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk" alias setjdk="launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk"
alias cdg="cd $GH_HOME" alias cdg="cd $GH_HOME"
alias cdgo="cd ~/.go/src" alias cdgo="cd ~/.go/src"
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl" alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv /private/var/log/asl/*.asl"
alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc.txt" alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc.txt"
alias ls="ls -a" alias ls="ls -a"
alias pbclear="echo -n '' | pbcopy" alias pbclear="echo -n '' | pbcopy"