Browse Source

Close #28 and added files to setup Neovim from Vim

Namely nvim and set-nvim.
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
8279772ca8
  1. 7
      README.md
  2. 29
      aliases/zsh_aliases
  3. 15
      configs/NZXT/i3.conf
  4. 2
      dotfiles/gitconfig
  5. 6
      dotfiles/nvim
  6. 7
      dotfiles/set-nvim.sh
  7. 3
      dotfiles/vimrc

7
README.md

@ -13,10 +13,10 @@ being. My dotfiles are primarily focused on workflow efficiency.
## Basic Info
* **OS**: Linux Mint 18.2
* **Terminal**: [rxvt](https://www.wikiwand.com/en/Rxvt)
* **Terminal**: [urxvt](https://www.wikiwand.com/en/Rxvt)
* **Shell**: [Zsh](http://zsh.sourceforge.net/)
* **WM**: [i3-gaps](https://github.com/Airblader/i3)
* **Editor**: Vim
* **Editor**: [Neovim](https://github.com/neovim/neovim)
## Setup
I wrote a couple simple scripts
@ -31,7 +31,7 @@ as they have slightly different needs (multiple monitors, screen size, etc.).
* [cmatrix](https://github.com/abishekvashok/cmatrix) - Matrix screensaver.
* [i3blocks](https://github.com/vivien/i3blocks) - Alternative status bar for
i3wm.
* [Various Vim plug-ins](https://github.com/Kevin-Mok/linux-config/blob/f922e56b50635c9344b26f9088e37acea5647359/dotfiles/vimrc#L38)
* [Various Vim plug-ins](https://github.com/Kevin-Mok/linux-config/blob/4dce53aafcd7cdafe888a92ec0dd6466cc07ca9f/dotfiles/vimrc#L36)
* [Neofetch](https://github.com/dylanaraps/neofetch) - CLI-based app to display
system information.
* [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh) - For Zsh config and
@ -43,6 +43,5 @@ as they have slightly different needs (multiple monitors, screen size, etc.).
## Switch From (To-Do)
* Linux Mint ➔ Arch Linux
* Vim(-based) apps:
* Vim ➔ [Neovim](https://github.com/neovim/neovim)
* Google Chrome ➔ [qutebrowser](https://github.com/qutebrowser/qutebrowser)
* Nemo/Thunar ➔ [ranger](https://ranger.github.io/)

29
aliases/zsh_aliases

@ -59,14 +59,14 @@ function aptr() { sudo apt remove $1 ; }
alias lc="f ~/linux-config/"
alias lca="f ~/linux-config/aliases"
alias vv="vi ~/.vimrc"
alias vu="vi ~/.Xresources"
alias vzb="vi ~/.zshrc"
alias vz="vi ~/linux-config/aliases/zsh_aliases"
alias vv="ni ~/.vimrc"
alias vu="ni ~/.Xresources"
alias vzb="ni ~/.zshrc"
alias vz="ni ~/linux-config/aliases/zsh_aliases"
# i3 {{{ #
alias v3="vi ~/.config/i3/config"
alias v3b="vi ~/.config/i3blocks/i3blocks.conf"
alias v3="ni ~/.config/i3/config"
alias v3b="ni ~/.config/i3blocks/i3blocks.conf"
alias i3b="f /usr/share/i3blocks"
alias pipes="pipes.sh -t 2"
@ -76,8 +76,8 @@ alias bgs="nemo ~/Pictures/Backgrounds"
# UltiSnips {{{ #
usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips"
alias snp="f $usnp_dir"
function vsnp() { vi ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; }
alias tm="vi $usnp_dir/texmath.snippets"
function vsnp() { ni ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; }
alias tm="ni $usnp_dir/texmath.snippets"
# }}} #
# }}} config files #
@ -85,6 +85,7 @@ alias tm="vi $usnp_dir/texmath.snippets"
# applications {{{ #
function ok() { okular $1 ; }
function chr() { google-chrome $1 ; }
function ni() { nvim $1 ; }
function mrk() { pandoc -o ${1%.*}.html $1 && chr ${1%.*}.html ; }
alias vbn="cvlc --loop --alsa-gain 1 ~/Downloads/brown-noise.mp3"
@ -166,7 +167,7 @@ function gvx() { urxvt --help 2>&1 | grep $1 ; }
# resume {{{ #
alias cv="f ~/Documents/resume/examples"
alias cvf="f ~/Documents/resume/examples/cv"
alias vcv="vi ~/Documents/resume/examples/cv.tex"
alias vcv="ni ~/Documents/resume/examples/cv.tex"
alias okcv="ok ~/Documents/resume/examples/cv.pdf"
# }}} resume #
@ -201,8 +202,8 @@ fi
alias gstore="git config credential.helper store"
# add {{{ #
alias ga="git add -A .*(.) && gs"
alias gac="git add -A .*(.); git commit"
alias ga="git add -A . && gs"
alias gac="git add -A . && git commit"
# }}} add #
# diff/log {{{ #
@ -237,8 +238,8 @@ alias grbc="git rebase --continue"
# }}} update #
# edit {{{ #
alias vig="vi .gitignore"
alias vir="vi README.md"
alias vig="ni .gitignore"
alias vir="ni README.md"
alias crm="mrk README.md"
# }}} edit #
@ -284,7 +285,7 @@ cd_coding_dir="f ~/Documents/coding"
alias ans="f /usr/local/android-studio/bin && ./studio.sh"
alias cdn="$cd_coding_dir"
alias tb="$cd_coding_dir/trapbot"
alias vtb="$cd_coding_dir/trapbot && vi scan_reddit.py"
alias vtb="$cd_coding_dir/trapbot && ni scan_reddit.py"
alias ptb="python scan_reddit.py"
alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py"
# }}} coding projs #

15
configs/NZXT/i3.conf

@ -1,5 +1,6 @@
# applications {{{ #
# startup {{{ #
set $def_term "rxvt-unicode"
exec redshift -O 4000
# random bg
# exec_always feh -z --bg-fill ~/Pictures/Backgrounds/*
@ -7,8 +8,8 @@ exec redshift -O 4000
# exec_always ~/.local/bin/wal -i "$HOME/Pictures/Backgrounds/"
exec_always ~/.local/bin/wal -i "$HOME/Pictures/Backgrounds/retro-mountains-pink.jpg"
exec imwheel
exec --no-startup-id i3-msg 'workspace 1 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 2 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 1 ; exec $def_term'
exec --no-startup-id i3-msg 'workspace 2 ; exec $def_term'
exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome'
# }}} startup #
@ -17,7 +18,7 @@ set $sch_dir "$HOME/Documents/School"
# app shortcuts {{{ #
bindsym Mod4+a exec studio
# bindsym $mod+control+Return exec i3-sensible-terminal
bindsym $mod+control+Return exec rxvt-unicode
bindsym $mod+control+Return exec $def_term
bindsym Mod4+c exec google-chrome
bindsym Mod4+e exec nemo
bindsym Mod4+o exec okular
@ -120,11 +121,11 @@ set $benq "HDMI-0"
set $ws1 "1 "
workspace $ws1 output $samsung
bindsym $mod+F1 workspace $ws1; exec terminator
bindsym $mod+F1 workspace $ws1; exec $def_term
set $ws2 "2 "
workspace $ws2 output $benq
bindsym $mod+F2 workspace $ws2; exec terminator
bindsym $mod+F2 workspace $ws2; exec $def_term
set $ws3 "3 "
workspace $ws3 output $benq
@ -151,7 +152,7 @@ assign [class="jetbrains-"] $ws8
set $ws9 "9 "
workspace $ws9 output $samsung
bindsym $mod+F9 workspace $ws9; exec terminator
bindsym $mod+F9 workspace $ws9; exec $def_term
set $ws10 "10 "
assign [class="VirtualBox"] $ws10
@ -159,7 +160,7 @@ bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 "
workspace $ws11 output $benq
bindsym $mod+F11 workspace $ws11; exec terminator
bindsym $mod+F11 workspace $ws11; exec $def_term
# }}} ws names #
# ws bindings {{{ #

2
dotfiles/gitconfig

@ -3,3 +3,5 @@
name = Kevin Mok
[color]
ui = auto
[core]
editor = nvim

6
dotfiles/nvim

@ -0,0 +1,6 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
let g:python_host_prog = '/usr/lib/python2.7'
" let g:python3_host_prog = '/usr/lib/python3.5.zip'

7
dotfiles/set-nvim.sh

@ -0,0 +1,7 @@
# Get directory variables from script.
. ../dirs.sh
orig_file="$sys_config_dir"/nvim/init.vim
# Remove system dotfile.
rm "$orig_file"
# Link dotfile in repository to system dotfile.
ln -s "$dot_dir"/nvim "$orig_file"

3
dotfiles/vimrc

@ -12,7 +12,7 @@ set linebreak
set shiftwidth=4
set autoindent
set mouse=c
set clipboard=unnamedplus
set clipboard+=unnamedplus
set foldmethod=marker
set linespace=5
" set listchars=tab:\|\
@ -137,6 +137,7 @@ nnoremap <leader>he :help
nnoremap <leader>vhe :vert help
nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
nnoremap <leader>nw :set nowrap<CR>
nnoremap <leader>nv :echo has('nvim')<CR>
nnoremap <leader>pli :PlugInstall<CR>
nnoremap <leader>plc :PlugClean<CR>
nnoremap <leader>plu :PlugUpdate<CR>

Loading…
Cancel
Save