aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-05 15:03:13 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-05 15:03:13 +0100
commit7d450ffb8caf12fa6bed250b6a67d3ecb237f904 (patch)
tree17cce63f88a01196de24bc02003cc9d23d0e1a5b
parentc8766f9ff619ded055f658f4508800454d31dc36 (diff)
downloaddotfiles-7d450ffb8caf12fa6bed250b6a67d3ecb237f904.tar.gz
dotfiles-7d450ffb8caf12fa6bed250b6a67d3ecb237f904.tar.bz2
dotfiles-7d450ffb8caf12fa6bed250b6a67d3ecb237f904.zip
Few adjuments for new distro, dual and single command for switching between single and dual screen
-rw-r--r--.pluggins.vim8
-rw-r--r--.tmux.conf8
-rw-r--r--.vimrc69
-rw-r--r--.zshrc84
4 files changed, 89 insertions, 80 deletions
diff --git a/.pluggins.vim b/.pluggins.vim
index 6e2f7a2..35c0918 100644
--- a/.pluggins.vim
+++ b/.pluggins.vim
@@ -11,20 +11,20 @@ call plug#begin()
" better highlight syntax
Plug 'justinmk/vim-syntax-extra'
"Plug 'junegunn/goyo.vim' " focus mode
- Plug 'w0rp/ale' " lint
+ " Plug 'w0rp/ale' " lint
Plug 'maximbaz/lightline-ale'
Plug 'romainl/vim-cool' " disable highlight after search
"Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' } " markdown preview with math typeset
Plug 'vim-scripts/awk.vim'
Plug 'sheerun/vim-polyglot' " better syntax highlighting
- Plug 'neovimhaskell/haskell-vim' " vim haskell highlighting
+ " Plug 'neovimhaskell/haskell-vim' " vim haskell highlighting
Plug 'haya14busa/incsearch.vim' " better incsearch
" themes
"Plug 'mhartington/oceanic-next'
- "Plug 'joshdick/onedark.vim'
- Plug 'morhetz/gruvbox'
+ Plug 'joshdick/onedark.vim'
+ " Plug 'morhetz/gruvbox'
Plug 'shinchu/lightline-gruvbox.vim'
Plug 'dracula/vim', { 'as': 'dracula' }
"Plug 'jdkanani/vim-material-theme'
diff --git a/.tmux.conf b/.tmux.conf
index d023ca5..ac350d7 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -14,11 +14,11 @@ unbind [
bind y copy-mode
unbind p
bind p paste-buffer
-bind-key -t vi-copy 'v' begin-selection
-bind-key -t vi-copy 'y' copy-selection
-bind-key -t vi-copy 'r' rectangle-toggle
+# bind-key -t vi-copy 'v' begin-selection
+# bind-key -t vi-copy 'y' copy-selection
+# bind-key -t vi-copy 'r' rectangle-toggle
-bind -t vi-copy y copy-pipe "xclip -sel clip -i"
+# bind -t vi-copy y copy-pipe "xclip -sel clip -i"
source-file $HOME/dotfiles/.my.tmuxtheme
diff --git a/.vimrc b/.vimrc
index 5ce1abc..318546a 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,9 +1,3 @@
-if &term =~# '^screen'
- let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
- let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
- set termguicolors " overwrite terminal theme
-endif
-
so $HOME/dotfiles/.pluggins.vim " source pluggins
let mapleader = ' '
@@ -33,7 +27,7 @@ nnoremap zl <C-W><
nnoremap zj <C-W>-
nnoremap zk <C-W>+
" tab to space
-" set expandtab
+set expandtab
set tabstop=4
set shiftwidth=4
set smarttab
@@ -64,54 +58,42 @@ set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
" ALE
-highlight clear ALEErrorSign
-highlight clear ALEWarningSign
-let g:ale_sign_error = '>'
-let g:ale_sign_warning = '-'
-let g:ale_lint_on_text_changed = 'never'
-let g:ale_lint_on_enter = 0
-let g:ale_echo_msg_error_str = 'E'
-let g:ale_echo_msg_warning_str = 'W'
-let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
-let g:ale_linters = {
- \ 'python': ['flake8']
- \ }
-let g:ale_fixers = {
- \ 'python': ['autopep8']
- \ }
+" highlight clear ALEErrorSign
+" highlight clear ALEWarningSign
+" let g:ale_sign_error = '>'
+" let g:ale_sign_warning = '-'
+" let g:ale_lint_on_text_changed = 'never'
+" let g:ale_lint_on_enter = 0
+" let g:ale_echo_msg_error_str = 'E'
+" let g:ale_echo_msg_warning_str = 'W'
+" let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
+" let g:ale_linters = {
+" \ 'python': ['flake8']
+" \ }
+" let g:ale_fixers = {
+" \ 'python': ['autopep8']
+" \ }
" let g:gruvbox_italic=1
-let g:gruvbox_contrast_dark="hard"
-colorscheme gruvbox
-set background=dark
+" let g:gruvbox_contrast_dark="hard"
+let g:onedark_terminal_italics=1
+colorscheme onedark
+" set background=dark
let g:lightline = {}
-let g:lightline.colorscheme = 'jellybeans'
-" let g:lightline.component_expand = {
-" \ 'linter_checking': 'lightline#ale#checking',
-" \ 'linter_warnings': 'lightline#ale#warnings',
-" \ 'linter_errors': 'lightline#ale#errors',
-" \ 'linter_ok': 'lightline#ale#ok',
-" \ }
-" let g:lightline.component_type = {
-" \ 'linter_checking': 'left',
-" \ 'linter_warnings': 'warning',
-" \ 'linter_errors': 'error',
-" \ 'linter_ok': 'left',
-" \ }
-" let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ]] }
+let g:lightline.colorscheme = 'one'
let base16colorspace=256
" NERDTree shortcut
-map <Leader>d :NERDTreeToggle<CR>
-map <Leader>f :NERDTreeFocus<CR>
+" map <Leader>d :NERDTreeToggle<CR>
+" map <Leader>f :NERDTreeFocus<CR>
" Global copy and paste
vnoremap <C-l> "+y
noremap <C-m> "+P
" 'Y' yank to the end of the line
-:noremap Y y$
+noremap Y y$
" remove trailing white space on save
autocmd BufWritePre * %s/\s\+$//e
@@ -119,6 +101,7 @@ autocmd BufWritePre * %s/\s\+$//e
" solves annoying delay went exiting insert mode
imap <ESC> <C-C>
imap jj <ESC>
+imap kk <ESC>
" remove visual mode keybinding
map Q <ESC>
@@ -127,6 +110,8 @@ map Q <ESC>
" autocmd Filetype c setlocal commentstring=// %s
" autocmd Filetype h setlocal commentstring=// %s
+autocmd Filetype c setlocal noexpandtab
+
set encoding=utf-8
set textwidth=89 " when line wrap occurs
diff --git a/.zshrc b/.zshrc
index c53ee1a..23c3df3 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,4 +1,6 @@
-export ZSH="$HOME/.oh-my-zsh"
+#!/usr/bin/zsh
+
+#export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="pure"
# ZSH_THEME="robbyrussell"
@@ -7,15 +9,15 @@ DISABLE_MAGIC_FUNCTIONS=true
HIST_STAMPS="dd/mm/yyyy"
#school stuff
-ZSH_DISABLE_COMPFIX=true
+#ZSH_DISABLE_COMPFIX=true
export FPATH="$FPATH:$HOME/.zsh/pure"
-plugins=(colorize git zsh-syntax-highlighting)
-source $ZSH/oh-my-zsh.sh
+#plugins=() #colorize git zsh-syntax-highlighting)
+#source $ZSH/oh-my-zsh.sh
-# autoload -U promptinit; promptinit
-# prompt pure
+autoload -U promptinit; promptinit
+prompt pure
bindkey -v
export KEYTIMEOUT=1
@@ -26,19 +28,17 @@ setopt list_rows_first
setopt extendedglob
# alias expansion
-bindkey "^ " _expand_alias # ctrl+space to expand
-bindkey " " magic-space # space to avoid expansion
-bindkey -M isearch " " magic-space
-
-# alt-arrow to go forward/backward a word
-# bindkey "^[[C" forward-word
-# bindkey "^[[D" backward-word
-
-alias -g G='| grep'
-alias -g L='| less'
-alias -g LO='192.168.0.'
-alias -g HUB="https://github.com/HappyTramp/"
+#bindkey "^ " _expand_alias # ctrl+space to expand
+#bindkey " " magic-space # space to avoid expansion
+#bindkey -M isearch " " magic-space
+
+#alias -g G='| grep'
+#alias -g L='| less'
+#alias -g LO='192.168.0.'
+#alias -g HUB="https://github.com/HappyTramp/"
+alias grep="grep --color=auto"
alias rr='rm -r'
+alias ls="ls --color"
alias ll="ls -lFh"
alias la="ls -a"
alias lA="ls -al"
@@ -46,8 +46,9 @@ alias lss="ls -Ssh"
alias l1="ls -1"
alias less="less -N"
alias mkdir="mkdir -p"
+alias tree="tree -C"
alias treeI="tree -I '__pycache__' -I '*.o' -I vendor"
-alias v="vim -c 'nunmap <buffer> al' -c 'nunmap <buffer> aj'"
+alias v="vim"
alias :q="exit"
alias :sp="tmux split-window"
@@ -64,10 +65,25 @@ alias list-c-includes-paths="echo | gcc -E -Wp,-v -"
alias yoump3='youtube-dl --extract-audio --audio-format mp3'
alias adg="sudo apt update && sudo apt upgrade"
+alias ga="git add"
+alias gaa="git add --all"
+alias gc="git commit"
+alias gc!="git commit --amend"
+alias gcmsg="git commit --message"
+alias gd="git diff"
+alias gds="git diff --staged"
+alias gl="git pull"
+alias glg="git log --stat"
+alias glgg="git log --graph"
+alias gp="git push"
+alias gcl="git clone --recurse-submodules"
+alias gst="git status"
+alias gco="git checkout"
+
function chpwd() {
file_count=$(ls | wc -w)
if [ $file_count -lt 30 ]; then
- ls
+ tree -L 1
else
echo "$(pwd) contains $file_count files"
fi
@@ -90,22 +106,22 @@ alias vimplugrc="vim $DOTFILES/.vimrc -c 'vsp $DOTFILES/.pluggins.vim'"
alias tmuxrc="vim $DOTFILES/.tmux.conf && tmux source-file $DOTFILES/.tmux.conf"
# vim keys in tab completion menu (https://www.youtube.com/watch?v=eLEo4OQ-cuQ)
-bindkey -M menuselect 'h' vi-backward-char
-bindkey -M menuselect 'k' vi-up-line-or-history
-bindkey -M menuselect 'l' vi-forward-char
-bindkey -M menuselect 'j' vi-down-line-or-history
-bindkey -v '^?' backward-delete-char
+#bindkey -M menuselect 'h' vi-backward-char
+#bindkey -M menuselect 'k' vi-up-line-or-history
+#bindkey -M menuselect 'l' vi-forward-char
+#bindkey -M menuselect 'j' vi-down-line-or-history
+#bindkey -v '^?' backward-delete-char
# add command-not-found package suggestion
#source /etc/zsh_command_not_found
# add /sbin to $PATH
-export PATH="/sbin:/usr/local/sbin:/usr/sbin:$PATH"
+# export PATH="$PATH:/sbin:/usr/local/sbin:/usr/sbin"
# add my bin
-export PATH="$HOME/bin:$PATH"
+# export PATH="$HOME/bin:$PATH"
# add go bins
-export PATH="$PATH:/usr/local/go/bin"
-export PATH="$PATH:$(go env GOPATH)/bin"
+# export PATH="$PATH:/usr/local/go/bin"
+#export PATH="$PATH:$(go env GOPATH)/bin"
# man with color
export LESS_TERMCAP_mb=$'\e[1;32m'
@@ -123,4 +139,12 @@ export XDG_DATA_HOME="/home/charles/.data/"
export EDITOR="vim"
# set tab to 4 spaces
-tabs 4
+# tabs 4
+
+dual () {
+ xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --auto
+}
+
+single () {
+ xrandr --output VGA1 --off
+}