Skip to content

Commit

Permalink
few small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yml committed Jul 23, 2018
1 parent 7016ba6 commit 6a77ac4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
9 changes: 8 additions & 1 deletion _bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ git_prompt_get_git_info () {
fi
}
#############################################################################
# history
# history
#############################################################################
function dedup_bash_history () {
rm -f ~./.unduped_bash_history && \
Expand Down Expand Up @@ -113,6 +113,13 @@ case $TERM in

esac

# function to an npm bin to $PATH
function addNpmBinToPath() {
if [[ -d $(npm bin) ]]; then
export PATH=$(npm bin):$PATH
fi
}

# Add env variable to work with GO easier
if [[ -d $HOME/gopath ]]; then
export GOPATH=$HOME/gopath
Expand Down
4 changes: 1 addition & 3 deletions _tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ bind s split-window -v
bind v split-window -h

# Use vim motion key while in copy mode
set-window-option -g mode-keys vi
setw -g mode-keys vi

# use the vim motion keys to move between panes
Expand Down Expand Up @@ -63,12 +62,11 @@ setw -g automatic-rename
set -g history-limit 50000

# ESC timeout needs to be tweaked to a low value (10-20ms)
set -g escape-time 10
set -g escape-time 11

if-shell -b '[ "$(echo "$TMUX_VERSION < 2.4" | bc)" = 1 ]' \
"bind-key Escape copy-mode; \
bind-key -t vi-copy Escape cancel; \
bind-key p paste-buffer; \
bind-key -t vi-copy v begin-selection; \
bind-key -t vi-copy V select-line; \
bind-key -t vi-copy y copy-selection; \
Expand Down
32 changes: 24 additions & 8 deletions _vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ if executable('pyls')
\ })
endif

if executable('`npm bin`/vls')
if executable('vls')
" npm install vue-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'vls',
\ 'cmd': {server_info->['`npm bin`/vls']},
\ 'whitelist': ['vue'],
\ 'cmd': {server_info->['vls']},
\ 'whitelist': ['vue', 'js'],
\ })
endif

Expand All @@ -80,13 +80,19 @@ endif

if has('nvim')
Plug 'neomake/neomake'
let g:neomake_verbose = 0

autocmd! BufWritePost * Neomake
if executable("flake8") && executable("pep8")
let g:neomake_python_enabled_makers = ['flake8', 'pep8',]
let g:neomake_python_flake8_maker = { 'args': ['--ignore=E115,E266,E501'], }
let g:neomake_python_pep8_maker = { 'args': ['--max-line-length=100', '--ignore=E115,E266'], }
endif
" javascript linting
if executable("eslint")
let g:neomake_javascript_enabled_makers = ['eslint']
let g:neomake_javascript_eslint_exe = '/home/yml/gopath/src/bitbucket.org/yml/gobby/frontend/node_modules/.bin/eslint'
endif
if executable("npm")
" (optional) javascript completion
Plug 'roxma/nvim-cm-tern', {'do': 'npm install'}
Expand Down Expand Up @@ -180,8 +186,6 @@ set shell=/bin/bash
if has('nvim')
" Activate the incremental (live) substitution
set inccommand=split
" Terminal settings
tnoremap <localleader>ESC> <C-\><C-n>
endif

"*****************************************************************************
Expand Down Expand Up @@ -348,10 +352,16 @@ augroup vimrc-javascript
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab softtabstop=4
augroup END

" vim-vue
augroup vimrc-vue
autocmd!
autocmd FileType vue setlocal tabstop=4 shiftwidth=2 expandtab softtabstop=2
augroup END

" vim-html
augroup vimrc-html
autocmd!
autocmd FileType html setlocal tabstop=4 shiftwidth=2 expandtab softtabstop=2 smartindent
autocmd FileType html setlocal tabstop=4 shiftwidth=2 expandtab softtabstop=2
augroup END
let g:html_indent_script1 = 'inc'
let g:html_indent_style1 = 'inc'
Expand Down Expand Up @@ -391,8 +401,14 @@ augroup END
augroup virmc-htmldjango
autocmd!
autocmd FileType htmldjango setlocal tabstop=2 shiftwidth=2 expandtab softtabstop=2
autocmd FileType htmldjango :iabbrev <buffer> {% {% %}<left><left><left>
autocmd FileType htmldjango :iabbrev <buffer> {{ {{ }}<left><left><left>
autocmd FileType htmldjango :iabbrev <buffer> {% {% %}<left><left><left> " } Cheat to make syntax highlighting happier
autocmd FileType htmldjango :iabbrev <buffer> {{ {{ }}<left><left><left> " }} Cheat to make syntax highlighting happier
augroup END

" gopass
augroup virmc-htmldjango
autocmd!
au BufNewFile,BufRead /dev/shm/gopass.* setlocal noswapfile nobackup noundofile
augroup END

" Set the filetype to yaml for salt's `.sls` extension
Expand Down

0 comments on commit 6a77ac4

Please sign in to comment.