Skip to content

Commit

Permalink
settings update
Browse files Browse the repository at this point in the history
  • Loading branch information
htdt committed Nov 28, 2020
1 parent d555487 commit 6c82ff8
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .config/flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E203, E266, W503
ignore = E203, E266, W503, E731
max-line-length = 89
max-complexity = 18
select = B,C,E,F,W,T4,B9
13 changes: 0 additions & 13 deletions .vim/UltiSnips/python.snippets

This file was deleted.

3 changes: 0 additions & 3 deletions .vim/UltiSnips/sh.snippets

This file was deleted.

1 change: 1 addition & 0 deletions .vim/ab.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ab ipdb import ipdb; ipdb.set_trace()
3 changes: 3 additions & 0 deletions .vim/coc-settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"diagnostic.errorSign": "",
"diagnostic.warningSign": "!",
"diagnostic.infoSign": "*",
"python.formatting.provider": "black",
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
Expand Down
9 changes: 7 additions & 2 deletions .vim/coc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ else
imap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
endif

" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
Expand All @@ -50,8 +55,8 @@ function! s:show_documentation()
endfunction

" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
hi CocHighlightText ctermbg=237
" autocmd CursorHold * silent call CocActionAsync('highlight')
" hi CocHighlightText ctermbg=237

" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
Expand Down
75 changes: 0 additions & 75 deletions .vim/pack/.gitmodules

This file was deleted.

6 changes: 6 additions & 0 deletions .vim/pack/clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
cd $1
while IFS= read -r line
do
git clone "$line"
done < "urls.txt"
11 changes: 11 additions & 0 deletions .vim/pack/colors/opt/urls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
https://github.com/jnurmine/Zenburn.git
https://github.com/morhetz/gruvbox.git
https://github.com/cocopon/iceberg.vim.git
https://github.com/nanotech/jellybeans.vim.git
https://github.com/haishanh/night-owl.vim.git
https://github.com/arcticicestudio/nord-vim.git
https://github.com/mhartington/oceanic-next.git
https://github.com/sainnhe/vim-color-forest-night.git
https://github.com/altercation/vim-colors-solarized.git
https://github.com/zeis/vim-kolor.git
https://github.com/jdkanani/vim-material-theme.git
15 changes: 15 additions & 0 deletions .vim/pack/plugins/start/urls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
https://github.com/neoclide/coc.nvim.git
https://github.com/haya14busa/incsearch.vim.git
https://github.com/vim-python/python-syntax.git
https://github.com/vim-airline/vim-airline.git
https://github.com/vim-airline/vim-airline-themes.git
https://github.com/ConradIrwin/vim-bracketed-paste.git
https://github.com/airblade/vim-gitgutter.git
https://github.com/kshenoy/vim-signature.git
https://github.com/ctrlpvim/ctrlp.vim.git
https://github.com/vim-scripts/indentpython.vim.git
https://github.com/leafgarland/typescript-vim.git
https://github.com/mbbill/undotree.git
https://github.com/tpope/vim-commentary.git
https://github.com/jremmen/vim-ripgrep.git
https://github.com/tpope/vim-surround.git
12 changes: 0 additions & 12 deletions .vim/pack/start.sh

This file was deleted.

1 change: 1 addition & 0 deletions .vim/pack/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for i in ~/.vim/pack/*/*/*; do git -C $i pull; done
36 changes: 30 additions & 6 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,33 @@ let mapleader=" "
set laststatus=2
set showcmd
set scrolloff=10
set listchars=""
"set listchars=""
set tabstop=4
set shiftwidth=4
set splitbelow
set splitright
set smarttab
set expandtab
set termguicolors
set listchars=trail:-
set backspace=indent,eol,start
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"

set background=dark
packadd iceberg.vim
colorscheme iceberg

let g:UltiSnipsExpandTrigger = "<Nop>"
packadd vim-material-theme
colorscheme material-theme

autocmd FileType python setlocal commentstring=#\ %s
autocmd FileType yaml setlocal commentstring=#\ %s
autocmd FileType typescript setlocal commentstring=//\ %s

autocmd FileType javascript setlocal tabstop=2 shiftwidth=2
autocmd FileType typescript setlocal tabstop=2 shiftwidth=2
autocmd FileType html setlocal tabstop=2 shiftwidth=2
autocmd FileType json setlocal tabstop=2 shiftwidth=2

let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']

set hlsearch
let g:incsearch#auto_nohlsearch = 1
Expand All @@ -50,7 +61,7 @@ map g# <Plug>(incsearch-nohl-g#)
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline_powerline_fonts = 1
let g:airline_theme = 'iceberg'
let g:airline_theme = 'deus'

autocmd BufWritePost * GitGutter
nmap ]h <Plug>(GitGutterNextHunk)
Expand Down Expand Up @@ -86,6 +97,18 @@ nnoremap <leader>c *``cgn
map [[ gg
map ]] G
" moving lines
nnoremap <c-j> :m .+1<CR>==
nnoremap <c-k> :m .-2<CR>==
inoremap <c-j> <Esc>:m .+1<CR>==gi
inoremap <c-k> <Esc>:m .-2<CR>==gi
vnoremap <c-j> :m '>+1<CR>gv=gv
vnoremap <c-k> :m '<-2<CR>gv=gv
if executable('rg')
set grepprg=rg\ --vimgrep\ --hidden
endif

no <down> <Nop>
no <left> <Nop>
no <right> <Nop>
Expand All @@ -102,3 +125,4 @@ vno <right> <Nop>
vno <up> <Nop>

source ~/.vim/coc.vim
source ~/.vim/ab.vim
10 changes: 7 additions & 3 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
[[ -z "$TMUX" ]] && { tmux attach || exec tmux new-session && exit; }
# [[ $- != *i* ]] && return
# [[ -z "$TMUX" ]] && { tmux attach || exec tmux new-session && exit; }

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$HOME/dev/_scripts:$PATH
export PATH=~/.npm-global/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/home/i/.oh-my-zsh"
Expand Down Expand Up @@ -44,7 +45,7 @@ ZSH_THEME="agnoster"
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
Expand Down Expand Up @@ -116,3 +117,6 @@ if [ -f '/home/i/app/google-cloud-sdk/path.zsh.inc' ]; then . '/home/i/app/googl

# The next line enables shell command completion for gcloud.
if [ -f '/home/i/app/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/i/app/google-cloud-sdk/completion.zsh.inc'; fi

export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
1 change: 0 additions & 1 deletion Secure Shell Preferences Backup.json

This file was deleted.

9 changes: 8 additions & 1 deletion start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ chsh -s $(which zsh)
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo apt install -y tmux vim-gtk python3-venv nodejs npm ripgrep
sudo apt install -y tmux python3-venv nodejs npm ripgrep
git clone https://github.com/vim/vim.git
cd src
make distclean # if you build Vim before
make
sudo make install
python3 -m venv .env
```
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ cp ~/.zshrc $REPO/

cp ~/.config/flake8 $REPO/.config/
cp ~/.vim/coc-settings.json $REPO/.vim/
cp ~/.vim/coc.vim $REPO/.vim/
cp -r ~/.vim/UltiSnips $REPO/.vim/
cp ~/.vim/pack/.gitmodules $REPO/.vim/pack
cp ~/.vim/*.vim $REPO/.vim/
cp ~/.vim/pack/plugins/start/urls.txt $REPO/.vim/pack/plugins/start/
cp ~/.vim/pack/colors/opt/urls.txt $REPO/.vim/pack/colors/opt/

0 comments on commit 6c82ff8

Please sign in to comment.