Skip to content

Instantly share code, notes, and snippets.

View haya14busa's full-sized avatar
🐶

haya14busa haya14busa

🐶
View GitHub Profile
diff --git autoload/vital/_easymotion/Over/Commandline/Modules/BufferComplete.vim autoload/vital/_easymotion/Over/Commandline/Modules/BufferComplete.vim
index ed72fce..61abb63 100644
--- autoload/vital/_easymotion/Over/Commandline/Modules/BufferComplete.vim
+++ autoload/vital/_easymotion/Over/Commandline/Modules/BufferComplete.vim
@@ -11,6 +11,19 @@ function! s:_uniq(list)
return keys(dict)
endfunction
+function! s:common_head(strs)
+ if empty(a:strs)
#!/usr/bin/env python
def levenshtein_distance(a, b):
'''
Algorighm: Dynamic Programming, DP
a: apple
b: python
b (j)
" Yank with keeping cursor position in visual mode {{{
function! s:wrap_y(command)
exec "normal! gv" . a:command
exec "normal! gv\<ESC>"
endfunction
xnoremap <silent> y <ESC>:call <SID>wrap_y('y')<CR>
xnoremap <silent> Y <ESC>:call <SID>wrap_y('Y')<CR>
"}}}
" ______ __ ___ __ _
" / ____/____ ________ __/ |/ /____ / /_(_)____ ____
" / __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \
" / /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / /
" /_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/
" /____/
" - Vim motions on speed!
"
"
" =======================================
# Vimrc Request Wiki
- author:
name: reedes
url: https://github.com/reedes # 一応任意(なかったりGitHub以外への対応)
vimrcs:
- name: vimrc # ここもファイル名を見ればいらない?(GitHub以外への対応としているかも)
url: https://github.com/reedes/vim-config/blob/master/vimrc
lines: 1024
requester: haya14busa
other: 作っているプラグインが面白い #省略可
#!/bin/sh
## Lua ##
# git clone http://luajit.org/git/luajit-2.0.git
# cd luajit-2.0
# make && sudo make install
#########
./configure \
--enable-fail-if-missing \
if has('vim_starting')
set nocompatible
set runtimepath& runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'thinca/vim-quickrun'
NeoBundle 'osyo-manga/vim-watchdogs'
function! g:Test(visualmode)
echom 'getpos("."): ' . string(getpos('.'))
echom 'v:count : ' . v:count
" normal! gv
endfunction
xnoremap <buffer> ,, :<C-u>call g:Test(1)<CR>
xnoremap <buffer> ;; <Esc>:<C-u>call g:Test(1)<CR>
" vim
" https://github.com/Lokaltog/vim-easymotion/tree/feature-flash-motions#add-helpful-hinting-to-f-and-t-motions
NeoBundle 'Lokaltog/vim-easymotion', { 'rev' : 'feature-flash-motions' }
let g:EasyMotion_do_mapping = 0 " do not use default bindings
let g:EasyMotion_do_shade = 0 " do not shade not to loose syntax
map f <Plug>(easymotion-flash-f)
map F <Plug>(easymotion-flash-F)
map t <Plug>(easymotion-flash-t)
map T <Plug>(easymotion-flash-T)
map ; <Plug>(easymotion-next-in-dir)
" https://github.com/Lokaltog/vim-easymotion/tree/feature-flash-motions#add-helpful-hinting-to-f-and-t-motions
let g:EasyMotion_do_mapping = 0 " do not use default bindings
let g:EasyMotion_do_shade = 0 " do not shade not to loose syntax
let g:EasyMotion_move_highlight = 0 " vim do not highlight
let g:EasyMotion_flash_time_ms = 1500 " flash time if you get used to it, set small time
map f <Plug>(easymotion-flash-f)
map F <Plug>(easymotion-flash-F)
map t <Plug>(easymotion-flash-t)