Skip to content

Commit 427d985

Browse files
committed
good working state
1 parent 1c6979c commit 427d985

File tree

3 files changed

+102
-76
lines changed

3 files changed

+102
-76
lines changed

.tmux.conf

+27-17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ unbind C-b
33
set-option -g prefix C-d
44
bind-key C-d send-prefix
55

6+
set -g default-terminal "screen-256color"
7+
68
# start window and pane indexing from 1
79
set -g base-index 1
810
setw -g pane-base-index 1
@@ -33,12 +35,11 @@ set-option -g allow-rename off
3335
# key binding to reload tmux config
3436
bind r source-file ~/.tmux.conf
3537

36-
# for vi colours
37-
set -g default-terminal "screen-256color"
38+
# start zsh when tmux is run
39+
set-option -g default-shell /usr/bin/zsh
3840

3941
# copy/paste within tmux
40-
set -g default-shell $SHELL
41-
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
42+
# set -g default-command "reattach-to-user-namespace -l ${SHELL}"
4243

4344
# New window with default path set to last path
4445
bind '"' split-window -c "#{pane_current_path}"
@@ -60,12 +61,24 @@ bind-key -T copy-mode-vi C-k select-pane -U
6061
bind-key -T copy-mode-vi C-l select-pane -R
6162
bind-key -T copy-mode-vi C-\ select-pane -l
6263

64+
# copy in linux system clipboard
65+
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
66+
67+
# Do not copy selection and cancel copy mode on drag end event
68+
# Prefer iTerm style selection: select, then mouse click to copy to buffer
69+
unbind -T copy-mode-vi MouseDragEnd1Pane
70+
bind -T copy-mode-vi MouseDown1Pane select-pane \;\
71+
send-keys -X copy-pipe "pbcopy" \;\
72+
send-keys -X clear-selection
73+
74+
# prevent sticky (repeatable) commands
75+
set-option -g repeat-time 0
76+
6377
# ----------------------
6478
# # set some pretty colors
6579
# # ----------------------
6680

67-
# set-option -g pane-border-fg colour235 #base02
68-
set-option -g pane-border-fg colour240 #base02
81+
# set-option -g pane-border-fg colour240 #base02
6982
set-option -g pane-active-border-fg colour240 #base01
7083

7184
# colorize messages in the command line
@@ -76,33 +89,30 @@ set-option -g message-fg brightred #orange
7689
# Status Bar
7790
# -----------------------
7891
set-option -g status on # turn the status bar on
79-
# set -g status-utf8 on # set utf-8 for the status bar
8092
set -g status-interval 5 # set update frequencey (default 15 seconds)
8193
set -g status-justify centre # center window list for clarity
82-
# set-option -g status-position top # position the status bar at top of screen
8394

8495
# visual notification of activity in other windows
8596
setw -g monitor-activity on
8697
set -g visual-activity on
8798

8899
# set color for status bar
89-
set-option -g status-bg colour235 #base02
100+
set-option -g status-bg "#101010"
90101
set-option -g status-fg yellow #yellow
91102
set-option -g status-attr dim
92103

93104
# set window list colors - red for active and cyan for inactive
94105
set-window-option -g window-status-fg brightblue #base0
95-
set-window-option -g window-status-bg colour236
106+
set-window-option -g window-status-bg "#101010"
96107
set-window-option -g window-status-attr dim
97108

98109
set-window-option -g window-status-current-fg brightred #orange
99-
set-window-option -g window-status-current-bg colour236
110+
set-window-option -g window-status-current-bg "#101010"
100111
set-window-option -g window-status-current-attr bright
101112

102-
# show host name and IP address on left side of status bar
103-
set -g status-left-length 70
104-
set -g status-left "#[fg=green] [#S] #I:#P :: #[fg=brightblue]#(curl icanhazip.com)"
113+
# left side
114+
set -g status-left-length 30
115+
set -g status-left "#[fg=green] [#S] #I:#P" # session-number, window and pane
105116

106-
# show session name, window & pane number, date and time on right side of status bar
107-
set -g status-right-length 60
108-
set -g status-right "#[fg=yellow] %d %b %Y %l:%M %p"
117+
# disable right hand side
118+
set -g status-right-length 0

.vimrc

+61-24
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ Plug 'tpope/vim-commentary'
1111
Plug 'sukima/xmledit'
1212
Plug 'ctrlpvim/ctrlp.vim'
1313
Plug 'christoomey/vim-tmux-navigator'
14+
Plug 'tpope/vim-dispatch'
15+
Plug 'vim-airline/vim-airline'
16+
Plug 'tomasiser/vim-code-dark'
17+
Plug 'janko-m/vim-test'
18+
Plug 'tmsvg/pear-tree'
1419
call plug#end()
1520

1621
let mapleader="\<Space>"
1722

23+
colorscheme codedark
24+
1825
syntax on
1926
filetype plugin indent on
2027
set encoding=utf8
@@ -23,9 +30,8 @@ filetype indent on
2330
set nowrap
2431
set confirm
2532
set autoindent
26-
set number "show line numbers
27-
set ts=4 "tab size"
28-
set sw=4 "shift width which is the one used when >
33+
set ts=2 "tab size"
34+
set sw=2 "shift width which is the one used when >
2935
set expandtab
3036
set smartindent
3137
set autoindent
@@ -34,12 +40,20 @@ set updatetime=750 "ui to update in 750ms for gitgutter renderings"
3440
set undolevels=1000
3541
set history=100
3642
set showcmd "displays commands you type in normal mode
37-
set clipboard=unnamed "use OS clipboard for all operations
43+
set clipboard=unnamedplus "use OS clipboard for all operations
3844
set splitbelow "open new split below which feels more natural
3945
set showmatch "highlight matching paranthesis
4046
set nocompatible
4147
set backspace=2
4248

49+
"line numbering
50+
set number relativenumber
51+
augroup numbertoggle
52+
autocmd!
53+
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
54+
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
55+
augroup END
56+
4357
"mouse support
4458
set mouse+=a
4559
if &term =~ '^screen'
@@ -83,35 +97,47 @@ nmap :bd :bp <BAR> bd #<CR>
8397
nmap <C-i> :botright vnew<CR>
8498
nmap <C-_> :split<CR>
8599
86-
" automatically jump to end of text you pasted
87-
" nnoremap <silent> y y`]
88-
" nnoremap <silent> p p`]
89-
" nnoremap <silent> p `]
90-
91-
" yy is broken for some reason
92-
nmap yy Y
93-
94100
" easy switching between buffers
95101
nmap <leader>b :buffers<CR>:b
96102
103+
" automatically create a file's folder if it doesn't exist
104+
fun! <SID>AutoMakeDirectory()
105+
let s:directory = expand("<afile>:p:h")
106+
if !isdirectory(s:directory)
107+
call mkdir(s:directory, "p")
108+
endif
109+
endfun
110+
autocmd BufWritePre,FileWritePre * :call <SID>AutoMakeDirectory()
111+
112+
" inoremap " ""<left>
113+
" inoremap ' ''<left>
114+
" inoremap ( ()<left>
115+
" inoremap [ []<left>
116+
" inoremap { {}<left>
117+
" inoremap {<CR> {<CR>}<ESC>O
118+
" inoremap {;<CR> {<CR>};<ESC>O
119+
97120
" Plugin configurations
98121
" ---------------------------------------------------------------------------
99122
"
100123
" ctrlp
101124
let g:ctrlp_show_hidden = 1
102-
let g:ctrlp_custom_ignore = {
103-
\ 'dir': 'node_modules\|.git',
104-
\ 'file': '.DS_Store'
105-
\ }
125+
let g:ctrlp_working_path_mode=0
126+
set wildignore+=*/node_modules/*,.git
106127

107128
" ack
108129
nmap <leader>s :Ack! ""<Left>
109130
110131
" ale
111132
let g:ale_linters = {'javascript': ['eslint']}
133+
let g:ale_fixers = {}
134+
let g:ale_fixers['javascript'] = ['prettier']
135+
let g:ale_javascript_prettier_use_local_config = 1
136+
let g:ale_fix_on_save = 1
112137

113138
" nerdtree
114139
nmap <leader>n :NERDTreeFind<CR>
140+
nmap <leader>/ :NERDTreeToggle<CR>
115141
let NERDTreeShowHidden=1
116142

117143
" tabularize
@@ -137,16 +163,27 @@ let g:UltiSnipsSnippetsDir="~/.vim/UltiSnips"
137163
let g:UltiSnipsEditSplit="vertical"
138164
set rtp+=~/.vim/UltiSnips
139165

140-
" automatically create a file's folder if it doesn't exist
141-
fun! <SID>AutoMakeDirectory()
142-
let s:directory = expand("<afile>:p:h")
143-
if !isdirectory(s:directory)
144-
call mkdir(s:directory, "p")
145-
endif
146-
endfun
147-
autocmd BufWritePre,FileWritePre * :call <SID>AutoMakeDirectory()
166+
" vim-dispatch
167+
setl errorformat+=%+G%.%# "sets quickfix to stay open even though there are no errors
168+
":Dispatch command is looking at b:dispatch variable for the command to run
169+
autocmd FileType javascript let b:dispatch = 'node %' "setting node as the runner for js files
170+
171+
" airline
172+
let g:airline#extensions#tabline#enabled = 1
173+
174+
" vim-test
175+
let test#strategy="vimterminal"
176+
177+
" pear-tree
178+
" Smart pairs are disabled by default:
179+
let g:pear_tree_smart_openers = 1
180+
let g:pear_tree_smart_closers = 1
181+
let g:pear_tree_smart_backspace = 1
182+
183+
let g:pear_tree_repeatable_expand = 0
148184

149185
" apigee
150186
" open policy file from proxy definition
151187
map <leader>p vity<ESC>:CtrlP<CR><C-\>c<CR>
188+
map <leader>pp vity<ESC>:vsplit<CR><C-l>:CtrlP<CR><C-\>c<CR>
152189
map <leader>np :e apiproxy/policies/.xml<Left><Left><Left><Left>

.zshrc

+14-35
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
export PATH=/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
22

33
# Path to your oh-my-zsh installation.
4-
export ZSH=/Users/ozanseymen/.oh-my-zsh
4+
# export ZSH=/Users/ozanseymen/.oh-my-zsh
5+
export ZSH=/home/ozanseymen/.oh-my-zsh
56

67
# Set name of the theme to load. Optionally, if you set this to "random"
78
# it'll load a random theme each time that oh-my-zsh is loaded.
@@ -29,7 +30,7 @@ ZSH_THEME=""
2930
# DISABLE_AUTO_TITLE="true"
3031

3132
# Uncomment the following line to enable command auto-correction.
32-
ENABLE_CORRECTION="false"
33+
# ENABLE_CORRECTION="true"
3334

3435
# Uncomment the following line to display red dots whilst waiting for completion.
3536
COMPLETION_WAITING_DOTS="true"
@@ -51,7 +52,9 @@ COMPLETION_WAITING_DOTS="true"
5152
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
5253
# Example format: plugins=(rails git textmate ruby lighthouse)
5354
# Add wisely, as too many plugins slow down shell startup.
54-
plugins=(git thefuck)
55+
plugins=(
56+
git
57+
)
5558

5659
source $ZSH/oh-my-zsh.sh
5760

@@ -86,47 +89,23 @@ source $ZSH/oh-my-zsh.sh
8689

8790
alias t="tmux"
8891

89-
#pure command prompt stuff
92+
# pure command prompt stuff
93+
fpath=( "$HOME/.zfunctions" $fpath )
9094
autoload -U promptinit; promptinit
9195
prompt pure
9296

93-
unsetopt correct_all
94-
95-
eval "$(thefuck --alias)"
96-
9797
# git aliases
9898
git config --global alias.co checkout
9999
git config --global alias.b branch
100100
git config --global alias.st status
101101

102-
export NVM_DIR="/Users/ozanseymen/.nvm"
103-
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
104-
105-
# place this after nvm initialization!
106-
autoload -U add-zsh-hook
107-
load-nvmrc() {
108-
local node_version="$(nvm version)"
109-
local nvmrc_path="$(nvm_find_nvmrc)"
110-
111-
if [ -n "$nvmrc_path" ]; then
112-
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
113-
114-
if [ "$nvmrc_node_version" = "N/A" ]; then
115-
nvm install
116-
elif [ "$nvmrc_node_version" != "$node_version" ]; then
117-
nvm use
118-
fi
119-
elif [ "$node_version" != "$(nvm version default)" ]; then
120-
echo "Reverting to nvm default version"
121-
nvm use default
122-
fi
123-
}
124-
add-zsh-hook chpwd load-nvmrc
125-
load-nvmrc
102+
# export NVM_DIR="/Users/ozanseymen/.nvm"
103+
export NVM_DIR="$HOME/.nvm"
104+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
105+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
126106

127107
# The next line updates PATH for the Google Cloud SDK.
128-
if [ -f '/Users/ozanseymen/google-cloud-sdk/path.zsh.inc' ]; then source '/Users/ozanseymen/google-cloud-sdk/path.zsh.inc'; fi
108+
if [ -f '/home/ozanseymen/Downloads/google-cloud-sdk/path.zsh.inc' ]; then source '/home/ozanseymen/Downloads/google-cloud-sdk/path.zsh.inc'; fi
129109

130110
# The next line enables shell command completion for gcloud.
131-
if [ -f '/Users/ozanseymen/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/ozanseymen/google-cloud-sdk/completion.zsh.inc'; fi
132-
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
111+
if [ -f '/home/ozanseymen/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/ozanseymen/Downloads/google-cloud-sdk/completion.zsh.inc'; fi

0 commit comments

Comments
 (0)