mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-29 15:26:54 +08:00
Compare commits
3 Commits
98dcd77a18
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddc14a6a54 | ||
|
|
879db51d09 | ||
|
|
3725f364cc |
14
README.md
14
README.md
@@ -1,3 +1,17 @@
|
||||
<div align="center" markdown="1">
|
||||
<sup>Special thanks to:</sup>
|
||||
<br>
|
||||
<a href="https://tuple.app/fzf.vim">
|
||||
<img alt="Tuple's sponsorship image" src="https://raw.githubusercontent.com/junegunn/i/master/tuple.png" width="400">
|
||||
</a>
|
||||
|
||||
### [Tuple, the premier screen sharing app for developers](https://tuple.app/fzf.vim)
|
||||
[Available for MacOS & Windows](https://tuple.app/fzf.vim)<br>
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
fzf :heart: vim
|
||||
===============
|
||||
|
||||
|
||||
@@ -669,9 +669,8 @@ function! s:history_sink(type, lines)
|
||||
let key = a:lines[0]
|
||||
let item = matchstr(a:lines[1], ' *[0-9]\+ *\zs.*')
|
||||
if key == 'ctrl-e'
|
||||
call histadd(a:type, item)
|
||||
redraw
|
||||
call feedkeys(a:type."\<up>", 'n')
|
||||
call feedkeys(a:type.item, 'nt')
|
||||
else
|
||||
if a:type == ':'
|
||||
call histadd(a:type, item)
|
||||
@@ -719,7 +718,7 @@ function! s:get_git_root(dir)
|
||||
return FugitiveWorkTree()
|
||||
endif
|
||||
let dir = len(a:dir) ? a:dir : substitute(split(expand('%:p:h'), '[/\\]\.git\([/\\]\|$\)')[0], '^fugitive://', '', '')
|
||||
let root = systemlist('git -C ' . shellescape(dir) . ' rev-parse --show-toplevel')[0]
|
||||
silent let root = systemlist('git -C ' . shellescape(dir) . ' rev-parse --show-toplevel')[0]
|
||||
return v:shell_error ? '' : (len(a:dir) ? fnamemodify(a:dir, ':p') : root)
|
||||
endfunction
|
||||
|
||||
@@ -1236,9 +1235,9 @@ function! s:command_sink(lines)
|
||||
endif
|
||||
let cmd = matchstr(a:lines[1], s:tab.'\zs\S*\ze'.s:tab)
|
||||
if empty(a:lines[0])
|
||||
call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'n')
|
||||
call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'nt')
|
||||
else
|
||||
call feedkeys(':'.cmd."\<cr>", 'n')
|
||||
call feedkeys(':'.cmd."\<cr>", 'nt')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user