Skip to content

Commit

Permalink
Big cleanup and update for new system install
Browse files Browse the repository at this point in the history
  • Loading branch information
olbrew committed Jan 12, 2018
1 parent 53f9cac commit 059289d
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 152 deletions.
24 changes: 23 additions & 1 deletion config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,29 @@ set fish_greeting
## Vi keybindings
fish_vi_key_bindings

## Abbreviations
if status --is-interactive
set -g fish_user_abbreviations
abbr --add c clear
abbr --add g git
abbr --add b brew
abbr --add ls 'exa -lha --sort=modified --git'
abbr --add l 'exa -1 --sort=modified'
abbr --add q 'clear; exit'
abbr --add log 'tail /var/log/system.log'
abbr --add src 'source ~/.config/fish/config.fish'
abbr --add c++ 'clang++ -std=c++14 -Wall -Wextra'
abbr --add yt 'youtube-dl -o "~/Downloads/%(title)s.%(ext)s"'
abbr --add hn 'nvim -c HackerNews'
abbr --add bc 'brew cask'
abbr --add whip 'dig TXT +short o-o.myaddr.l.google.com @ns1.google.com'
abbr --add rg 'rg -pS'
abbr --add wt 'webtorrent --blocklist "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz" --iina download'
end

## Environment variables
# Editor
set -x EDITOR 'kak'
set -x EDITOR 'nvim'
# Compilation flags
set -x ARCHFLAGS '-arch x86_64'
# Prevent ._* files from being written
Expand All @@ -15,3 +35,5 @@ set -x COPYFILE_DISABLE 'true'
set -x HOMEBREW_NO_INSECURE_REDIRECT 'true'
# disable homebrew analytics
set -x HOMEBREW_NO_ANALYTICS 1
# Kryptco
set -x GPG_TTY (tty)
6 changes: 0 additions & 6 deletions dotfilesrc

This file was deleted.

19 changes: 0 additions & 19 deletions fish_aliases.txt

This file was deleted.

6 changes: 0 additions & 6 deletions fishfile

This file was deleted.

9 changes: 7 additions & 2 deletions gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@
[credential]
helper = osxkeychain
[core]
editor = nvim
editor = vim
excludesfile = ~/.gitignore_global
pager = less -R
[stash]
showPatch = true
[log]
decorate = full
[gpg]
program = /usr/local/bin/krgpg
[commit]
gpgSign = true
[tag]
forceSignAnnotated = true
[push]
default = simple
followTags = true
Expand All @@ -23,6 +29,5 @@
pl = pull
ps = push
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lg = log
co = checkout
prune = fetch --prune
2 changes: 1 addition & 1 deletion gitignore_global
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Logs and databases #
######################
*.log
*.sql
#*.sql
*.sqlite

# Latex help files #
Expand Down
111 changes: 51 additions & 60 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,30 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Automatically install vim-plug if not yet present when opening init.vim
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter init.vim PlugInstall --sync | source $MYVIMRC
endif

call plug#begin()
Plug 'Valloric/YouCompleteMe' " Autocomplete support
Plug 'neomake/neomake' " Asynchronous make & syntax checking
Plug 'Chiel92/vim-autoformat' " Autoformatting
Plug 'tpope/vim-repeat' " Repeat with . for plugins
Plug 'tpope/vim-fugitive' " Git wrapper
Plug 'tpope/vim-vinegar' " Netrw improved
Plug 'tpope/vim-surround' " Quoting/parenthesizing made simple
Plug 'wting/gitsessions.vim' " Improved vim session management
Plug 'lifepillar/vim-solarized8' " Solarized colorscheme
Plug 'Raimondi/delimitMate' " Auto match parentheses,...
Plug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim' " FZF integration
Plug 'christoomey/vim-tmux-navigator' " Consistent vim, tmux window mappings
Plug 'airblade/vim-gitgutter' " Git diff in gutter
Plug 'easymotion/vim-easymotion' " Faster vim motions
Plug 'critiqjo/lldb.nvim' " LLDB integration
Plug 'Valloric/ListToggle' " Quickfix and locationlist toggle
Plug 'pangloss/vim-javascript' " Javascript syntax and indentation
Plug 'mxw/vim-jsx' " JSX highlighting
Plug 'StanAngeloff/php.vim' " PHP improved hightlighting
Plug 'kassio/neoterm' " Wrapper for neovim terminal
Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' } " Visual undo-tree
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' } " Distraction free mode
Plug 'ryanss/vim-hackernews', { 'on': 'HackerNews' } " HackerNews in vim
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " Built-in snippet defaults
Plug 'Valloric/YouCompleteMe' " Autocomplete support
Plug 'neomake/neomake' " Asynchronous make & syntax checking
Plug 'Chiel92/vim-autoformat' " Autoformatting
Plug 'tpope/vim-repeat' " Repeat with . for plugins
Plug 'tpope/vim-fugitive' " Git wrapper
Plug 'tpope/vim-vinegar' " Netrw improved
Plug 'tpope/vim-surround' " Quoting/parenthesizing made simple
Plug 'junegunn/vim-easy-align' " Align things
Plug 'romainl/flattened' " Solarized colorscheme
Plug 'Raimondi/delimitMate' " Auto match parentheses,...
Plug 'christoomey/vim-tmux-navigator' " Consistent vim-tmux window mappings
Plug 'airblade/vim-gitgutter' " Git diff in gutter
Plug 'brooth/far.vim' " Project-wide find and Replace
Plug 'easymotion/vim-easymotion' " Faster vim motions
Plug 'Valloric/ListToggle' " Quickfix and locationlist toggle
Plug 'kassio/neoterm' " Wrapper for neovim terminal
Plug 'mbbill/undotree' " Visual undo-tree
Plug 'junegunn/goyo.vim' " Distraction free mode
Plug 'ryanss/vim-hackernews' " HackerNews in vim
Plug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim' " FZF integration
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " Built-in snippet defaults
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes' " Fancy statusline
Plug 'junegunn/vim-easy-align', { 'on': ['<Plug>(EasyAlign)', 'EasyAlign'] } " Align things
call plug#end()

" Automatically install missing plugins when opening init.vim
Expand All @@ -58,7 +48,7 @@ let maplocalleader = ' '
"set termguicolors

" Solarized colorscheme
colorscheme solarized8_dark_flat
colorscheme flattened_dark

" Set background for colors
set background=dark
Expand Down Expand Up @@ -138,9 +128,6 @@ let g:tex_flavor = 'latex'
" Recognize HTML in PHP code
let php_htmlInStrings = 1

autocmd FileType tex BufWritePre !Latexmk -pdflua %
autocmd FileType tex VimLeavePre !Latexmk -c

" Enable spell checking for prose
autocmd FileType tex setlocal spell spelllang=en,nl
autocmd FileType text setlocal spell spelllang=en,nl
Expand Down Expand Up @@ -218,11 +205,11 @@ inoremap <return> <C-R>=Ulti_ExpandOrEnter()<CR>
" Remap escape
inoremap jj <ESC>
" Switch ':' with ';' for faster commands (without <S>)
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
" switch ':' with ';' for faster commands (without <s>)
"nnoremap ; :
"nnoremap : ;
"vnoremap ; :
"vnoremap : ;

" Unmap Ex mode
map Q <Nop>
Expand Down Expand Up @@ -291,40 +278,44 @@ nnoremap <Leader>gs :Gstatus<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugin config "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Run Neomake linter when opening or saving buffers
autocmd BufWritePost,BufEnter * Neomake

" Autoformat buffer on write
autocmd BufWritePost * :Autoformat
let g:autoformat_autoindent = 0
" Run Neomake when reading a buffer (after 1s), and when writing
call neomake#configure#automake('rw', 1000)
let g:neomake_markdown_enabled_makers = ['proselint']
let g:neomake_text_enabled_markers = ['proselint']
let g:neomake_tex_enabled_markers = ['proselint']
let g:neomake_gitcommit_enabled_markers = ['proselint']

" YCM replacement for Ctags in C files
autocmd FileType c,cpp nnoremap <buffer> <silent> <C-]>: YcmCompleter GoTo<cr>
" Autoformat buffer on write
autocmd BufWritePost * :Autoformat
let g:autoformat_autoindent = 0

" YouCompleteMe global C++ compilation flags
let g:ycm_global_ycm_extra_conf = '~/.config/nvim/cfg/ycm_extra_conf.py'
let g:ycm_global_ycm_extra_conf = '~/.config/nvim/cfg/ycm_extra_conf.py'

" Place vim sessions in neovim directory
let g:gitsessions_dir = '~/.config/nvim/sessions'
let g:gitsessions_dir = '~/.config/nvim/sessions'

" File explorer tree mode
let g:netrw_liststyle = 3
let g:netrw_list_hide = netrw_gitignore#Hide()
let g:netrw_liststyle = 3
let g:netrw_list_hide = netrw_gitignore#Hide()

" Ultisnips
let g:UltiSnipsExpandTrigger = "<c-tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
let g:UltiSnipsSnippetDirectories = ["cfg"]
let g:UltiSnipsExpandTrigger = "<c-tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
let g:UltiSnipsSnippetDirectories = ["cfg"]

" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#buffer_min_count = 2
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#buffer_min_count = 2
let g:airline_powerline_fonts = 1

" Allow JSX in normal JS files
let g:jsx_ext_required = 0
let g:jsx_ext_required = 0

" Ultisnips change expandtrigger to not conflict with YCM
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsExpandTrigger = "<c-j>"
46 changes: 0 additions & 46 deletions kakrc

This file was deleted.

2 changes: 0 additions & 2 deletions lldbinit

This file was deleted.

3 changes: 0 additions & 3 deletions tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ unbind C-b
set -g prefix C-a
bind C-a send-prefix

## Enable true color support
set-option -ga terminal-overrides ",xterm-256color:Tc"

## Disable status bar
set -g status off

Expand Down
48 changes: 48 additions & 0 deletions update.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
function update -d "Update all tools and applications om MacOS"
if nc -z google.com 80 >/dev/null 2>&1
echo "πŸ†• Updating System (root)"
sudo softwareupdate --install -all
echo \n

echo "πŸ†• Updating Brew"
brew update
brew upgrade
brew cleanup
brew cask cleanup
brew prune
echo \n

echo "πŸ†• Updating Fisher"
fisher up
echo \n

echo "πŸ†• Updating Python"
pip3 list --outdated --local | awk '{print $1;}' | xargs -n1 pip3 install -U
pip2 list --outdated --local | awk '{print $1;}' | xargs -n1 pip2 install -U
echo \n

echo "πŸ†• Updating Vim"
nvim +PlugUpgrade +PlugUpdate +qall
echo \n

echo "πŸ†• Updating Ruby Gems"
gem update
echo \n

echo "πŸ†• Updating TLDR"
tldr --update
echo \n

echo "πŸ†• Updating Yarn"
yarn global upgrade
echo \n

echo "πŸ†• Updating Fish Completions"
fish_update_completions
echo \n

echo "Succes! You are fully up to date now. πŸ‘ "
else
echo "You are currently not connected to the internet. Try again later."
end
end
6 changes: 0 additions & 6 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ inoremap jj <ESC>
" Reload config in vim
nnoremap <Leader>r :so $MYVIMRC<CR>
" Switch ':' with ';' for faster commands (without <S>)
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
" Faster buffer switching
nnoremap J :bprevious<CR>
nnoremap K :bnext<CR>
Expand Down

0 comments on commit 059289d

Please sign in to comment.