[vim] add plugins for Racket and fzf
change
commit 5b73ac0cd46370025fdd244d457d3a5851033bfe
author Alpha Chen <alpha.chen@gmail.com>
date
parent 8ae7d627
diff --git a/.gitmodules b/.gitmodules
index 6d3bfa80..927a6fe0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -94,3 +94,12 @@
 [submodule ".vim/pack/alpha/start/vim-sexp"]
 	path = .vim/pack/alpha/start/vim-sexp
 	url = git@github.com:guns/vim-sexp.git
+[submodule ".vim/pack/alpha/start/fzf.vim"]
+	path = .vim/pack/alpha/start/fzf.vim
+	url = git@github.com:junegunn/fzf.vim.git
+[submodule ".vim/pack/alpha/start/scribble.vim"]
+	path = .vim/pack/alpha/start/scribble.vim
+	url = git@github.com:vim-scripts/scribble.vim.git
+[submodule ".vim/pack/alpha/start/rainbow_parentheses.vim"]
+	path = .vim/pack/alpha/start/rainbow_parentheses.vim
+	url = git@github.com:kien/rainbow_parentheses.vim.git
diff --git a/.vim/after/ftplugin/racket.vim b/.vim/after/ftplugin/racket.vim
new file mode 100644
index 00000000..4c895d3b
--- /dev/null
+++ b/.vim/after/ftplugin/racket.vim
@@ -0,0 +1 @@
+au VimEnter * RainbowParenthesesToggle
diff --git a/.vim/after/ftplugin/ruby.vim b/.vim/after/ftplugin/ruby.vim
index c75e6fd8..ce07d87a 100644
--- a/.vim/after/ftplugin/ruby.vim
+++ b/.vim/after/ftplugin/ruby.vim
@@ -1 +1,2 @@
+highlight rubyDefine ctermbg=235
 set foldmethod=syntax
diff --git a/.vim/after/ftplugin/scribble.vim b/.vim/after/ftplugin/scribble.vim
new file mode 100644
index 00000000..8c3028ca
--- /dev/null
+++ b/.vim/after/ftplugin/scribble.vim
@@ -0,0 +1 @@
+set makeprg=scribble\ --dest\ scribble\ %
diff --git a/.vim/ftdetect/scribble.vim b/.vim/ftdetect/scribble.vim
new file mode 100644
index 00000000..fc53f6ae
--- /dev/null
+++ b/.vim/ftdetect/scribble.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.scrbl set filetype=scribble
diff --git a/.vim/pack/alpha/start/fzf.vim b/.vim/pack/alpha/start/fzf.vim
new file mode 160000
index 00000000..f31a2925
--- /dev/null
+++ b/.vim/pack/alpha/start/fzf.vim
@@ -0,0 +1 @@
+Subproject commit f31a2925fee37b4b5f9a3fa115df4ae99a2a027c
diff --git a/.vim/pack/alpha/start/rainbow_parentheses.vim b/.vim/pack/alpha/start/rainbow_parentheses.vim
new file mode 160000
index 00000000..eb8baa54
--- /dev/null
+++ b/.vim/pack/alpha/start/rainbow_parentheses.vim
@@ -0,0 +1 @@
+Subproject commit eb8baa5428bde10ecc1cb14eed1d6e16f5f24695
diff --git a/.vim/pack/alpha/start/scribble.vim b/.vim/pack/alpha/start/scribble.vim
new file mode 160000
index 00000000..73cef958
--- /dev/null
+++ b/.vim/pack/alpha/start/scribble.vim
@@ -0,0 +1 @@
+Subproject commit 73cef95895420c64b988ef11f79a75d1058e26f7
diff --git a/.vimrc b/.vimrc
index ffd7f9a0..28d904a8 100644
--- a/.vimrc
+++ b/.vimrc
@@ -144,27 +144,10 @@ nnoremap <leader>a :A<cr>
 " dispatch
 nnoremap <leader>d :Dispatch<cr>
 
-" lightline
-let g:lightline = {
-      \ 'component': {
-      \   'lineinfo': ' %3l:%-2v',
-      \ },
-      \ 'component_function': {
-      \   'readonly': 'LightlineReadonly',
-      \   'fugitive': 'LightlineFugitive'
-      \ },
-      \ 'separator': { 'left': '', 'right': '' },
-      \ 'subseparator': { 'left': '', 'right': '' }
-      \ }
-
-function! LightlineReadonly()
-  return &readonly ? '' : ''
-endfunction
-
-function! LightlineFugitive()
-  if exists('*fugitive#head')
-    let branch = fugitive#head()
-    return branch !=# '' ? ''.branch : ''
-  endif
-  return ''
-endfunction
+" fzf
+if isdirectory('/usr/local/opt/fzf')
+  set rtp+=/usr/local/opt/fzf
+  nmap <Leader>b :Buffers<CR>
+  nmap <Leader>f :Files<CR>
+  nmap <Leader>t :Tags<CR>
+endif