Started working on switch from vim to nvim

main
Steffen Rademacker 8 years ago
parent a43821a9f9
commit ef5ea3b1a3

@ -0,0 +1,29 @@
" All bundles, syntaxes and plugins
"======================================================================
" TODO Replace those with the de-versions
" NeoBundle 'Shougo/neocomplete'
" NeoBundle 'Shougo/neosnippet'
" NeoBundle 'Shougo/unite.vim'
call dein#add('cakebaker/scss-syntax.vim')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('cocopon/lightline-hybrid.vim')
call dein#add('editorconfig/editorconfig-vim')
call dein#add('gcorne/vim-sass-lint')
call dein#add('haya14busa/incsearch.vim')
call dein#add('itchyny/lightline.vim')
call dein#add('justinmk/vim-sneak')
call dein#add('moll/vim-node')
call dein#add('mtscout6/syntastic-local-eslint.vim')
call dein#add('scrooloose/syntastic')
call dein#add('sheerun/vim-polyglot')
call dein#add('tpope/vim-commentary')
call dein#add('tpope/vim-fugitive')
call dein#add('tpope/vim-ragtag')
call dein#add('tpope/vim-repeat')
call dein#add('tpope/vim-surround')
call dein#add('tpope/vim-unimpaired')
call dein#add('tpope/vim-vinegar')
call dein#add('w0ng/vim-hybrid')
call dein#add('webgefrickel/vim-snippets')
call dein#add('wellle/tmux-complete.vim')

@ -4,12 +4,9 @@
filetype plugin indent on
syntax on
NeoBundleCheck
set autoread " Automatically read a file that has changed on disk
set backspace=indent,eol,start " Allow backspacing over everything in insert mode
set cursorline " highlight current line
set encoding=utf-8 " Yeah. UTF-8 FTW!
set grepprg=ag " use ag for grepping
set hidden " allows for switching buffers without writing
set lazyredraw " Don't redraw while executing macros
@ -30,8 +27,6 @@ set showcmd " show me what im doing. helps alot
set sidescroll=10 " smoother side-scrolling
set sidescrolloff=5 " jump by 5 when scrolling sideways
set timeout ttimeoutlen=100 " get rid of the delay when pressing O (for example)
set ttyfast " faster terminal usage
set ttymouse=xterm2 " xterm/tmux compatible mouse
set virtualedit=all " every mode active from v V to StrgV
set visualbell " don't flicker
set complete-=i " dont complete from files

@ -0,0 +1 @@
Subproject commit 1dd1f3e8bc541fceec2fc496185b1908615e7c35

@ -0,0 +1 @@
Subproject commit 4461789d02f81fd328afbdf27d6404b6c763c25f

@ -0,0 +1 @@
Subproject commit e79d4c0c24c43d3ada283b1f5a1b8fa6cf820a70

@ -0,0 +1 @@
Subproject commit ef45bdd664cf8df6bf4d016ea13ae54b1d92a4dd

@ -0,0 +1 @@
Subproject commit a459b8cfef00100da40fd69c8ae92c4d1e63e1d2

@ -0,0 +1 @@
Subproject commit b9ff33141294c7af143f12687e9b1cf9a3a54e0f

@ -0,0 +1 @@
Subproject commit 161c5b66542e767962ca5f6998a22e984f8d8a60

@ -0,0 +1 @@
Subproject commit 059888ab650fa192dd441e52bd9f41f08b247529

@ -0,0 +1 @@
Subproject commit f00084c6f9e28e8836c3e4b5dc7e255098843a10

@ -0,0 +1 @@
Subproject commit 13b31218447335e176d46dd5f497b274f7f49595

@ -0,0 +1 @@
Subproject commit 3700f01459b9532ead77874f8910bf0499e2461c

@ -0,0 +1 @@
Subproject commit 675f67eea29308537438eb49b3b28a444c1e4689

@ -0,0 +1 @@
Subproject commit 74652b465d7eff97070001317a4ea5557717378d

@ -0,0 +1 @@
Subproject commit 73e0d9a9d1f51b6cc9dc965f62669194ae851cb1

@ -0,0 +1 @@
Subproject commit b754bc2031f21a532c083dd0d072ba373bbe3a37

@ -0,0 +1 @@
Subproject commit 9378cddc1c264f777af59f04e5b8d64eca8ee5fd

@ -0,0 +1 @@
Subproject commit 7a6675f092842c8f81e71d5345bd7cdbf3759415

@ -0,0 +1 @@
Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313

@ -0,0 +1 @@
Subproject commit 11dc568dbfd7a56866a4354c737515769f08e9fe

@ -0,0 +1 @@
Subproject commit bd7f7b7929260072864462c04dde3b9f4c5e0d23

@ -0,0 +1 @@
Subproject commit cc58baabeabc7b83768e25b852bf89c34756bf90

@ -0,0 +1 @@
Subproject commit 33090dc59223641e3daad2006511d18226b327a5

@ -0,0 +1 @@
Subproject commit b6fe12c60389df174a9b244d377b83abd50205f1

@ -0,0 +1,29 @@
" my vimrc - this file basically initalies neobundle and loads
" other config files from vim/config + the plugins-subfolder
"======================================================================
set langmenu=en_US.UTF-8
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
call dein#begin(expand('~/.config/nvim/dein'))
source ~/.config/nvim/bundles.vim
call dein#end()
" load the default config and mappings
source ~/.config/nvim/defaultconfig.vim
source ~/.config/nvim/search.vim
source ~/.config/nvim/whitespace.vim
source ~/.config/nvim/autocommands.vim
source ~/.config/nvim/colorscheme.vim
source ~/.config/nvim/keymappings.vim
source ~/.config/nvim/leaderkeys.vim
" and the configs and mappings for plugins loaded in bundles.vim
source ~/.config/nvim/plugins/fugitive.vim
source ~/.config/nvim/plugins/incsearch.vim
source ~/.config/nvim/plugins/lightline.vim
" source ~/.config/nvim/plugins/neosnippet.vim
" source ~/.config/nvim/plugins/neocomplete.vim
source ~/.config/nvim/plugins/sneak.vim
source ~/.config/nvim/plugins/syntastic.vim
" source ~/.config/nvim/plugins/unite.vim

@ -1,6 +1,9 @@
" Custom key mappings and shortcuts
"======================================================================
" fix an issue with nvim + c+h for tmux-vim navigation
nnoremap <silent> <BS> :TmuxNavigateLeft<cr>
" remap semi-colon to be colon in normal an visual mode
nnoremap ; :
vnoremap ; :

@ -22,23 +22,23 @@ brew install koekeishiya/kwm/kwm
brew install koekeishiya/khd/khd
brew install tmux
brew install zsh
brew install neovim/neovim/neovim --HEAD
brew install python3
# install macvim and neobundle for vim
brew install macvim --with-cscope --with-lua --HEAD
mkdir ~/.vim/bundle
git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim
# install deps + plugins for neovim
pip3 install neovim
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
sh installer.sh ~/.config/nvim/dein
# this is the minimal software used
# this is the minimal software and fonts used
brew cask install forklift
brew cask install hyper
brew cask install owncloud
# add a nice font
brew cask install caskroom/fonts/font-hack
brew linkapps
brew tap homebrew/services
# clipper + kwm
# clipper + kwm/khd
mkdir -p ~/Library/LaunchAgents
brew services start clipper
brew services start khd
@ -50,17 +50,16 @@ git submodule update
# link the dotfiles
ln -s ~/dotfiles/agignore ~/.agignore
ln -s ~/dotfiles/config ~/.config
ln -s ~/dotfiles/editorconfig ~/.editorconfig
ln -s ~/dotfiles/gemrc ~/.gemrc
ln -s ~/dotfiles/gitconfig ~/.gitconfig
ln -s ~/dotfiles/gitignore ~/.gitignore
ln -s ~/dotfiles/hyperterm.js ~/.hyperterm.js
ln -s ~/dotfiles/kwm ~/.kwm
ln -s ~/dotfiles/khdrc ~/.khdrc
ln -s ~/dotfiles/kwm ~/.kwm
ln -s ~/dotfiles/ruby-version ~/.ruby-version
ln -s ~/dotfiles/tmux.conf ~/.tmux.conf
ln -s ~/dotfiles/vim ~/.vim
ln -s ~/dotfiles/vimrc ~/.vimrc
ln -s ~/dotfiles/zsh ~/.zsh
ln -s ~/dotfiles/zshrc ~/.zshrc

@ -38,7 +38,7 @@ khd mode launcher color 0xff5e8d87
# toggle between modes
ralt - a: khd -e "mode activate resizer"; kwmc config border focused on;
ralt - s: khd -e "mode activate vimmode"; kwmc config border focused on;
ralt - x: khd -e "mode activate launcher"; kwmc config border focused on;
ralt - d: khd -e "mode activate launcher"; kwmc config border focused on;
resizer + ralt - a: khd -e "mode activate default"; kwmc config border focused off;
vimmode + ralt - s: khd -e "mode activate default"; kwmc config border focused off;
launcher + ralt - x: khd -e "mode activate default"; kwmc config border focused off;

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMIsApplet</key>
<true/>
<key>AMStayOpen</key>
<false/>
<key>BuildMachineOSBuild</key>
<string>15E8</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>Automator workflow file</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Application Stub</string>
<key>CFBundleIconFile</key>
<string>AutomatorApplet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.automator.NeoVim</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NeoVim</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>419</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7C43</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15E8</string>
<key>DTSDKName</key>
<string>macosx10.11internal</string>
<key>DTXcode</key>
<string>0720</string>
<key>DTXcodeBuild</key>
<string>7C43</string>
<key>LSMinimumSystemVersion</key>
<string>10.5</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSUIElement</key>
<true/>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
<string>ApplicationStub</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSServices</key>
<array/>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AMApplicationBuild</key>
<string>419</string>
<key>AMApplicationVersion</key>
<string>2.6</string>
<key>AMDocumentVersion</key>
<string>2</string>
<key>actions</key>
<array>
<dict>
<key>action</key>
<dict>
<key>AMAccepts</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Optional</key>
<true/>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>AMActionVersion</key>
<string>1.0.2</string>
<key>AMApplication</key>
<array>
<string>Automator</string>
</array>
<key>AMParameterProperties</key>
<dict>
<key>source</key>
<dict/>
</dict>
<key>AMProvides</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>ActionBundlePath</key>
<string>/System/Library/Automator/Run AppleScript.action</string>
<key>ActionName</key>
<string>Run AppleScript</string>
<key>ActionParameters</key>
<dict>
<key>source</key>
<string>on run {input} set the_path to POSIX path of input set cmd to "nvim " &amp; quoted form of the_path tell application "System Events" to set terminalIsRunning to exists application process "Terminal" tell application "Terminal" activate if terminalIsRunning is true then do script with command cmd else do script with command cmd in window 1 end if end tell end run</string>
</dict>
<key>BundleIdentifier</key>
<string>com.apple.Automator.RunScript</string>
<key>CFBundleVersion</key>
<string>1.0.2</string>
<key>CanShowSelectedItemsWhenRun</key>
<false/>
<key>CanShowWhenRun</key>
<true/>
<key>Category</key>
<array>
<string>AMCategoryUtilities</string>
</array>
<key>Class Name</key>
<string>RunScriptAction</string>
<key>InputUUID</key>
<string>3526A534-47A2-4C57-BA3E-3FC7004E5ED4</string>
<key>Keywords</key>
<array>
<string>Run</string>
</array>
<key>OutputUUID</key>
<string>55CCF874-3A0D-4364-BE1A-BB05F07B364C</string>
<key>UUID</key>
<string>5ECF9CF3-F18A-47C1-A7A9-9F850E413B5A</string>
<key>UnlocalizedApplications</key>
<array>
<string>Automator</string>
</array>
<key>arguments</key>
<dict>
<key>0</key>
<dict>
<key>default value</key>
<string>on run {input, parameters}
(* Your script goes here *)
return input
end run</string>
<key>name</key>
<string>source</string>
<key>required</key>
<string>0</string>
<key>type</key>
<string>0</string>
<key>uuid</key>
<string>0</string>
</dict>
</dict>
<key>conversionLabel</key>
<integer>0</integer>
<key>isViewVisible</key>
<true/>
<key>location</key>
<string>526.000000:316.000000</string>
<key>nibPath</key>
<string>/System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib</string>
</dict>
<key>isViewVisible</key>
<true/>
</dict>
</array>
<key>connectors</key>
<dict/>
<key>workflowMetaData</key>
<dict>
<key>workflowTypeIdentifier</key>
<string>com.apple.Automator.application</string>
</dict>
</dict>
</plist>

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<root>
<item>
<!-- copy top ~/Library/Application\ Support/Karabiner/ -->
<name>Remap F19 Hyper</name>
<appendix>This maps F19 (keycode 80) to Control + Shift + Option + Command</appendix>
<identifier>webgefrickel.hyperhyper</identifier>
<autogen>
--KeyToKey--
KeyCode::F19,
KeyCode::COMMAND_L,
ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L
</autogen>
</item>
</root>

@ -1,48 +0,0 @@
" All bundles, syntaxes and plugins
"======================================================================
NeoBundle 'Shougo/vimproc.vim', {
\ 'build': {
\ 'mac': 'make -f make_mac.mak',
\ 'linux': 'make',
\ 'unix': 'gmake'
\ }
\ }
" use the bundled matchit instead of one from github
NeoBundle 'matchit.zip', {
\ 'on_map' : ['%', 'g%']
\ }
let bundle = neobundle#get('matchit.zip')
function! bundle.hooks.on_post_source(bundle)
silent! execute 'doautocmd Filetype' &filetype
endfunction
" and now all bundles that don't need special treatment
NeoBundle 'Shougo/neocomplete'
NeoBundle 'Shougo/neosnippet'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'cakebaker/scss-syntax.vim'
NeoBundle 'christoomey/vim-tmux-navigator'
NeoBundle 'cocopon/lightline-hybrid.vim'
NeoBundle 'editorconfig/editorconfig-vim'
NeoBundle 'gcorne/vim-sass-lint'
NeoBundle 'haya14busa/incsearch.vim'
NeoBundle 'itchyny/lightline.vim'
NeoBundle 'justinmk/vim-sneak'
NeoBundle 'mattn/emmet-vim/'
NeoBundle 'moll/vim-node'
NeoBundle 'mtscout6/syntastic-local-eslint.vim'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'sheerun/vim-polyglot'
NeoBundle 'tpope/vim-commentary'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'tpope/vim-ragtag'
NeoBundle 'tpope/vim-repeat'
NeoBundle 'tpope/vim-surround'
NeoBundle 'tpope/vim-unimpaired'
NeoBundle 'tpope/vim-vinegar'
NeoBundle 'w0ng/vim-hybrid'
NeoBundle 'webgefrickel/vim-snippets'
NeoBundle 'wellle/tmux-complete.vim'

@ -1,10 +0,0 @@
" gui options for macvim / gvim
"======================================================================
if has('gui_running')
set guifont=Hack:h12 " a nice font here
set linespace=0 " hack is nice, but very wide...
set guioptions-=T " no toolbar
set guioptions-=L " no left scrollbar
set guioptions-=r " no right scrollbar
endif

@ -1,9 +0,0 @@
" Emmet config
"======================================================================
let g:user_emmet_mode = 'a' " enable in insert and visual mode
let g:emmet_html5 = 0
let g:user_emmet_install_global = 0
let g:user_emmet_leader_key = '<C-e>'
autocmd FileType html,php,scss,css EmmetInstall

@ -2,6 +2,7 @@
alias sudo='sudo '
# always use macvim but for 'vim'
alias nvim=$EDITOR
alias vim=$EDITOR
alias vi=$EDITOR
alias v=$EDITOR
@ -25,12 +26,12 @@ alias z='fasd_cd -d' # cd, same functionality as j in autojump
alias zz='fasd_cd -d -i' # cd with interactive selection
# suffix-aliases for file-types (zsh only)
alias -s css=vim
alias -s scss=vim
alias -s js=vim
alias -s html=vim
alias -s md=vim
alias -s txt=vim
alias -s css=nvim
alias -s scss=nvim
alias -s js=nvim
alias -s html=nvim
alias -s md=nvim
alias -s txt=nvim
# clipper -- https://github.com/wincent/clipper
alias clip="nc localhost 8377"
@ -79,8 +80,8 @@ alias upall='sysup && brewup && npmup'
alias npmre='rm -rf node_modules && npm cache clean && npm install'
# easy hosts / apache / php editing
alias hosts='sudo vim /etc/hosts'
alias vhosts='vim /usr/local/etc/nginx/servers/'
alias hosts='sudo nvim /etc/hosts'
alias vhosts='nvim /usr/local/etc/nginx/servers/'
# often used folder shortcuts
alias web='cd ~/Sites && ls -al'

@ -8,6 +8,7 @@ export HOMEBREW_CASK_OPTS="--appdir=/Applications"
export PATH=$HOME/.composer/vendor/bin:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export MANPATH=/usr/local/share/man:$MANPATH
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
@ -18,8 +19,8 @@ export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
# editor
export EDITOR="/Applications/MacVim.app/Contents/MacOS/Vim"
export VISUAL="/Applications/MacVim.app/Contents/MacOS/Vim"
export EDITOR="/usr/local/bin/nvim
export VISUAL="/usr/local/bin/nvim
# disable auto titling fixes tmux window
export DISABLE_AUTO_TITLE=true

@ -61,7 +61,7 @@ fancy-ctrl-z () {
# open changed files in git index
function gch () {
vim `git status | grep modified | awk '{print $3}'`
nvim `git status | grep modified | awk '{print $3}'`
}
# creates an archive from given directory

Loading…
Cancel
Save