Commit Graph

294 Commits (master)

Author SHA1 Message Date
Junegunn Choi 9526594905
[vim] Fix FZF_DEFAULT_COMMAND on Windows
Close #847. Patch submitted by @wontoncc.
7 years ago
Junegunn Choi fc274c2ba4
[vim] Do not escape % when using system() instead of !
Close https://github.com/junegunn/fzf.vim/issues/309
7 years ago
Prabir Shrestha a847fe8754 Use "type" instead of "cat" on windows (#836) 7 years ago
Junegunn Choi 02ceae15a2
[vim] Download instruction for Windows 7 years ago
Junegunn Choi 72265298f9
[vim] Apply --no-height when running fzf in full screen mode
To override --height option in FZF_DEFAULT_OPTS
7 years ago
Kassio Borges 712b7b2188 [vim] Expose buffer variable with the current fzf setup (#828)
Exposing the `b:fzf` variable will be useful to get information about
which command is being executed on the current fzf window. With that,
now, it's possible to use the current command name on the statusline:

```viml
au User FzfStatusLine call <SID>fzf_statusline()

function! s:fzf_statusline()
  let fzf_cmd_name = get(b:fzf, 'name', 'FZF')
  let &l:statusline = '> '.fzf_cmd_name
endfunction
```
7 years ago
Junegunn Choi a425e96fb2
[vim] g:fzf_prefer_tmux for choosing fzf-tmux over --height
https://github.com/junegunn/fzf.vim/issues/296
7 years ago
Junegunn Choi cbb5134874
[vim] Use 24-bit colors if termguicolors is set 7 years ago
Junegunn Choi 2a669e9a17
Clear lines even when background color is not set
Also revert the workaround in Vim plugin introduced in fa7c897.

Related: #814
7 years ago
Junegunn Choi fa7c8977a8
[vim] tput el to clear the last line
Close #814

Not grouping commands to avoid errors on non-standard shells.
7 years ago
Junegunn Choi 05ed57a9f0 Merge pull request #794 from junegunn/devel
0.16.0
7 years ago
Junegunn Choi 2720816266
[vim] Use /dev/tty as STDIN when using --height w/o explicit source 7 years ago
Justin M. Keyes 1896aa1748 s:common_sink(): Avoid duplicate BufEnter. (#803)
Later versions of Vim/Nvim handle `:edit <dir>` inside try-catch.

e13b9afe12
https://github.com/vim/vim/pull/1375
7 years ago
Junegunn Choi 1a50f1eca1
[vim] Use --height instead of fzf-tmux 7 years ago
Junegunn Choi 1448d631a7
Add --height option 7 years ago
Jan Edmund Lazo 3670273719 [vim] Use cmd.exe directly on GVim (launcher='%s') (#787) 7 years ago
Jan Edmund Lazo 6c0fd7f9ca
[vim] FZF command to handle Windows paths with spaces
- Use noshellslash for strict path expansion in fzf#run and s:cmd
  (shellescape depends on shellslash)
- Double-quote the fzf command for cmd.exe
- Add fzf#shellescape to encapsulate the logic
- Close #786
7 years ago
Jan Edmund Lazo 42a2371d26 [vim] Use cmd.exe in Windows (#785) 7 years ago
Daniel Hahler 847c512539 s:execute_term: switch_back: check that self.pbuf exists (#776)
With a `bufhidden=wipe` buffer (e.g. vim-startify) the buffer would not
exist anymore, resulting in an error.
8 years ago
Marco Hinz 8a502af4c1 Neovim: event handlers always expect three arguments (#768) 8 years ago
Junegunn Choi c60bfb2b0f
[neovim] Keep alternate file unchanged
Close https://github.com/junegunn/fzf.vim/issues/265
8 years ago
Junegunn Choi ab9ae4f643
[vim] Fix path display in FZF when cwd is ~ 8 years ago
Junegunn Choi d9a51030ea
[vim] Display relative path in prompt 8 years ago
Junegunn Choi 37f2d8f795
[vim] Respect g:fzf_colors
Close #711
8 years ago
Junegunn Choi 9b9ad39143
[vim] Set g:loaded_fzf 8 years ago
Junegunn Choi 053af9a1c8
[fzf-tmux/vim/nvim] Do not split small window
Close #699
8 years ago
Junegunn Choi 01b88539ba
[vim] Apply --multi and --prompt to :FZF command 8 years ago
Junegunn Choi d87390934e
[neovim] Do not resize if the size of the screen has changed
Related #642
8 years ago
Joshua Rubin f025602841
[vim] Reset window sizes on close
Fix #520
Fix junegunn/fzf.vim#42
8 years ago
Junegunn Choi f958c9daf5
[vim] Tilde prefix is not allowed for `left` or `right` layout 8 years ago
Junegunn Choi 3e88849386
[vim] Fix "E706: Variable type mismatch for: arg" 8 years ago
Junegunn Choi 62f6ff9d6c
[vim] Make arguments to fzf#wrap() optional
fzf#wrap([name string,] [opts dict,] [fullscreen boolean])
8 years ago
Junegunn Choi 7cef92fffe
[vim] Delete fzf buffer even when exit status is non-zero
Fix #183
8 years ago
Junegunn Choi 42e4992f06
[vim] Make sure to delete fzf buffer
Close junegunn/fzf.vim#173 and #630
8 years ago
Kassio Borges 27444d6b1e Remove `name` option from `termopen`.
`termopen` no longer accepts a `name` option, instead we should suffix the
command with `;#NAME`.
8 years ago
Junegunn Choi d6a99c0391
[vim] v:shell_error can change around redraw!
Patch suggested by Mariusz Atamańczuk
8 years ago
Junegunn Choi f787f7e651
[vim] Add fzf#wrap helper function
Close #627
8 years ago
Junegunn Choi a7c9c08371
[vim] Make :FZF command configurable with g:fzf_layout
To make it consistent with the other commands in fzf.vim
8 years ago
Junegunn Choi a1049328d6
[vim] Adjust split size when --header option is set
Close #622
8 years ago
Junegunn Choi 5c2b96bd00
[vim] Fix error with multi-line $FZF_DEFAULT_COMMAND
Close #620
8 years ago
Junegunn Choi 942ba749c7
[vim] Restore working directory even when new window is opened
Close #612
8 years ago
Edgar Hipp fe5db5aadc Add fzf_prefer_tmux option 8 years ago
Junegunn Choi 1c86aaf342
[vim/fzf-tmux] Handle fzf project directory with spaces
Close #583
8 years ago
Junegunn Choi 412c211655
[vim] Use lcd instead of chdir
https://github.com/junegunn/fzf.vim/issues/147
8 years ago
Junegunn Choi 0231617857 [neovim] Fix issues with `enew` and `tabnew` layouts
Related: #559
8 years ago
Junegunn Choi 095f31b316 [vim] Explicitly set source to FZF_DEFAULT_COMMAND
Helps when your `$SHELL` is slow.

Close #552.
8 years ago
Junegunn Choi 654a7df9b0 [neovim] Set bufhidden and nobuflisted after opening terminal 8 years ago
Junegunn Choi e867355b2a [neovim] Restore winfixwidth and winfixheight
Fix https://github.com/junegunn/fzf.vim/issues/128
8 years ago
Junegunn Choi e5ac2ebd7c [vim] Escape $
https://github.com/junegunn/fzf.vim/issues/114
8 years ago
Junegunn Choi f704b94603 [neovim] Open tab before current tab
Related: https://github.com/junegunn/gv.vim/issues/19
8 years ago
Junegunn Choi 3073ca3e5a [neovim] Take total number of tab pages into account (#520)
This fixes the problem where a new tab page is not closed when the
following configuration is used:

  let g:fzf_layout = { 'window': 'execute (tabpagenr()-1)."tabnew"' }
8 years ago
Justin M. Keyes a7bc9d5351 s:callback: Always return list.
Fixes "E706: Variable type mismatch for: ret" when an exception is
caught.
8 years ago
Junegunn Choi 2b3e740569 [neovim] Fix error in finally block when callback failed
e.g. Opening another buffer when `set nohidden`

https://github.com/junegunn/fzf.vim/issues/77
8 years ago
Junegunn Choi 0f281ef894 [vim] Try to make 'dir' option compatible with &autochdir
When 'dir' option is passed to fzf#run(), the current working directory
is temporarily changed to the given directory, and restored at the end.
However, this behavior is not compatible with &autochdir. This commit
introduces a heuristic to determine whether or not to restore the
previous working directory.

Related: https://github.com/junegunn/fzf.vim/issues/70
8 years ago
Junegunn Choi b18db4733c [vim] Do not restore working directory on unexpected cwd
We should not restore the previous working directory if the current
directory has changed somehow. This can happen when &autochdir is set.
8 years ago
Junegunn Choi 6e08fe337c [nvim] setlocal nospell on terminal buffer
Close #469. `setlocal nospell` should appear before `setf fzf` to allow
customization of the option.
8 years ago
Junegunn Choi b5850ebd4c [vim] Open selected file in the current window if it's empty
Close #451
9 years ago
Pokey Rule d513a210c6 Support fzf-tmux when zoomed 9 years ago
Junegunn Choi 5769d3867d [nvim] setf fzf 9 years ago
Jacob Niehus ed893c5f47 Trigger netrw autocommand when opening directory 9 years ago
Justin M. Keyes c4e5ee63bb [vim] handle SwapExists
The SwapExists dialog prevents multiple files from being opening if the
dialog occurs before all files are opened. Opening the files is more
important than showing the dialog, so choose "readonly" automatically
and continue opening files.
9 years ago
Junegunn Choi 862da2c0b1 [vim] Consistent exit status handling 9 years ago
James Baumgarten 59220c63a6 [vim] handle exit status 1 properly (#359) 9 years ago
Junegunn Choi 86306dd45a [vim] Display proper error message when GVim launcher failed
Related: https://github.com/junegunn/fzf.vim/issues/16
9 years ago
Junegunn Choi aec48f159b [neovim] Remove redraw! hack that is no longer needed 9 years ago
Junegunn Choi 5a60aa5050 [vim] Display proper error message when command failed 9 years ago
Junegunn Choi ca19762e58 Exit status 130 when fzf is terminated by the user
Related: #345
9 years ago
Junegunn Choi 8764be07e2 [vim] Ignore exit status of 2 (#345) 9 years ago
Junegunn Choi ac160f98a8 [gvim] Fix #342 - Should not escape launcher part of the command 9 years ago
Junegunn Choi 62e01a2a62 [vim] Escape newline character when running fzf with :!
Fixes Helptags! command from fzf.vim
9 years ago
Junegunn Choi 698e8008df [vim] Dynamic height specification for 'up' and 'down' options
Values for 'up' and 'down' can be written with ~ prefix. Only applies
when the source is a Vim list.

    e.g. { 'source': range(10), 'down': '~40%' }
9 years ago
Junegunn Choi 8fb31e1b4d [vim] Escape % and # when running source command with :! 9 years ago
Junegunn Choi 55d566b72f Revert "[vim] Open silently"
This reverts commit c601fc6437.
9 years ago
Junegunn Choi 7ae877bd3a [vim] Handle single/double quote characters in 'dir' option 9 years ago
Junegunn Choi c601fc6437 [vim] Open silently 9 years ago
Junegunn Choi e5fec408c4 [vim] tab split instead of tabedit 9 years ago
Junegunn Choi 0b4542fcdf [vim] Temporarily disable &autochdir when opening files (#306) 9 years ago
Junegunn Choi fcae99f09b No need to "tmux list-panes" when obviously not on tmux (#303) 9 years ago
Junegunn Choi fb1b026d3d Always check if the pane is zoomed
Close #303
9 years ago
Junegunn Choi 9f953fc944 Do not use tmux pane if the current pane is zoomed
Close #303
9 years ago
Junegunn Choi 11db046fc7 [neovim] Fix #281 - Properly close window with winnr 1 9 years ago
Junegunn Choi 355d004895 [neovim] Fix error with {'window': 'enew'} (#274) 9 years ago
Kassio Borges 9f33068ab3 Avoid conflict with other neoterm plugins.
To avoid conflict with other neoterm plugins that manage terminals,
prefer named terminals.
9 years ago
Junegunn Choi 34e5e2dd82 [vim] Use close+bufhidden=wipe instead of bd 9 years ago
Junegunn Choi 2b7c3df66b [neovim] Check tabpagenr() as well 9 years ago
Junegunn Choi f766531e74 [neovim] Make sure that fzf buffer is closed (#225)
- bd! leaves the window open when there's no other listed buffer
- redraw! seems to help avoid Neovim issues.
9 years ago
Junegunn Choi 7f59b42b05 [vim] Escape % # \ 9 years ago
Junegunn Choi f41de932d6 [vim] Refocus MacVim window 9 years ago
Junegunn Choi 0937bd6c16 [vim] Improve binary detection
/cc @alerque

- Ask for user confirmation before running `install --bin`
- Removed `s:fzf_rb` since `install --bin` will create a wrapper
  executable that just runs Ruby version on the platforms where prebuilt
  binaries are not available.
9 years ago
Junegunn Choi 3d26b5336c [vim] Fix #220 - Prevent error after update 9 years ago
Junegunn Choi 09d0ac0347 [vim] Update default launcher for GVim (#212)
Code submitted by @lydell
9 years ago
Junegunn Choi 857619995e [vim] Ignore E325 (#213) 9 years ago
Junegunn Choi 9310ae28ab [vim] Redraw screen after running fzf on tmux pane (#213) 9 years ago
Junegunn Choi 27e26bd1ea [vim] Add g:Fzf_launcher for funcrefs (#212) 9 years ago
Junegunn Choi 917b1759b0 [fzf-tmux/vim] Fixes for fish (#204) 9 years ago
Junegunn Choi 537d07c1e5 [vim] Use "system" fzf when available
1. Go binary: ../bin/fzf
2. System fzf: $(which fzf)
3. Download fzf from GitHub or create wrapper script to Ruby version (../fzf)
   when the binary for the platform is not available
4. If install script is not found or for some reason failed, try to use Ruby
   version in its expected location (../fzf)
5. If fzf is found to be a shell function, use it (type fzf)
9 years ago
Junegunn Choi a30908c66a [vim] Automatically download Go binary when not found 9 years ago
Junegunn Choi 853012ceef [vim] Add g:fzf_action for customizing key bindings
Close #189
9 years ago
Junegunn Choi 2add45fe2f [vim] Rename g:fzf_tmux_height to g:fzf_height
Because tmux panes are not used on Neovim.
9 years ago
Junegunn Choi 319d6ced80 [vim] Simplify :FZF
Ruby version can also accept `--expect` option although it's ignored.
9 years ago
Junegunn Choi 51a19a2804 [vim] Remove unnecessary pushd/popd in :FZF
It is already handled by its caller.
9 years ago
Bryan Head 82bea6758a Move active check to fzf#run. 9 years ago
Junegunn Choi 8385a55bda [vim] s:pushd after s:split
It is possible that the user has an autocmd that changes the current
directory.
9 years ago
Junegunn Choi 8406cedf2d [vim] Improved compatibility with sidebar plugins (e.g. NERDtree) 9 years ago
Junegunn Choi 1481304d3b Suppress message from :file
Suggested by @noahfrederick
9 years ago
Marco Hinz c1adf0cd3d Check if :FZF is already executing
Prior to this change, you'd get a longer error message if you did:

    :FZF
    <esc>
    :FZF

The main problem being that `:file [FZF]` can be used only once.
9 years ago
Junegunn Choi 622e69ff54 [vim] Neovim compatibility (#137)
Use terminal emulator of Neovim to open fzf
9 years ago
Junegunn Choi 68503d32df [vim] Code cleanup 9 years ago
Junegunn Choi 57319f8c58 [vim] Fix #177 - :FZF with relative paths 9 years ago
Junegunn Choi 8a4db3c004 [vim] Fix #167 - :FZF with directory 9 years ago
Junegunn Choi e865144ace [vim] Implement ctrlp-compatible key bindings (#139, #96, #61) 9 years ago
Junegunn Choi bc2e82efc1 [vim] Suppress error message when clear command is N/A 9 years ago
Junegunn Choi 49c752b1f7 [vim] up/down/left/right options to take boolean values
When 1 is given, 50% of the screen width or height will be used as the
default size of the pane.
9 years ago
Junegunn Choi daa79a6df2 [vim] fzf#run with tmux panes can now return values to the caller
As they're made synchronous with the use of fzf-tmux script
9 years ago
Junegunn Choi 12d81e212f [vim] Use fzf-tmux script for tmux integration 9 years ago
Junegunn Choi 06ab399497 Improve how vim plugin finds fzf executable
This avoids the problem in which :FZF command silently fails when fzf
executable cannot be found in $PATH of the hosting tmux server.
9 years ago
Junegunn Choi 8a0ab20a70 Update vim plugin to use Go binary 9 years ago
Junegunn Choi 6fd6fff3a6 [vim] Ignore 'dir' option if empty
This makes it easier to override FZF command like follows:

    autocmd VimEnter * command! -nargs=? -bang -complete=dir FZF call fzf#run({
          \ 'sink': 'tabe',
          \ 'dir': <q-args>,
          \ 'options': '-m',
          \ 'tmux_height': empty('<bang>') ? '40%' : '' })
10 years ago
Junegunn Choi 1e07b3b1c2 [vim] Apply FZF_DEFAULT_{OPTS,COMMAND} when using tmux splits (#87)
Fixed escaping bug of the previous commit
10 years ago
Junegunn Choi 4313c1c25c Revert "[vim] Apply FZF_DEFAULT_{OPTS,COMMAND} when using tmux splits (#87)"
This reverts commit cc9938d4c9.
10 years ago
Junegunn Choi cc9938d4c9 [vim] Apply FZF_DEFAULT_{OPTS,COMMAND} when using tmux splits (#87) 10 years ago
Junegunn Choi 89298a8d23 [vim] Do not print error message on exit status 1 10 years ago
Junegunn Choi 3e91c189ae [vim] Defer `type fzf` to reduce startup time 10 years ago
Junegunn Choi 4a3a5ee70d [vim] External terminal emulator for GVim 10 years ago
Junegunn Choi 65c1b53275 [vim] Options to xterm command 10 years ago
Junegunn Choi 0b43f988c7 [vim] Enable fzf in GVim using xterm 10 years ago
Junegunn Choi 16031b0d54 [Vim] Allow vertical split of tmux window 10 years ago
Junegunn Choi af677e7e35 Vim plugin: do not enable tmux-integration if version < 1.7 10 years ago
Junegunn Choi af616457e3 Use -p option of split-window instead of manual calculation 10 years ago
Junegunn Choi 1a100a2919 No need for screenrow() 10 years ago
Junegunn Choi a85bb93b69 Fix use of screenrow when tmux height is given in % 10 years ago
Junegunn Choi cf8dbf8047 Allow setting tmux split height in % 10 years ago
Junegunn Choi 2b346659a0 Vim plugin: tmux integration 10 years ago
Junegunn Choi 49081711a9 Execute clear before fzf 10 years ago
Junegunn Choi e7439ce193 Major update to Vim plugin 10 years ago
Junegunn Choi b8e438b6be Prefer pre-existing function/alias in Vim plugin 10 years ago
Junegunn Choi 2540c9062f The last argument doesn't have to be a path 11 years ago
Junegunn Choi f28274109f Update Vim plugin to take path argument 11 years ago
Junegunn Choi 90adda73b0 Update Vim plugin
Changes:
- Rename g:fzf_command to g:fzf_source
- Support multi-select mode
- Add fzf#run(vim_command, fzf_args) function

Todo:
- Faster startup with --disable-gems option when available
11 years ago
Junegunn Choi dc67420319 Make fzf.vim separately installable 11 years ago
Junegunn Choi fd2472d11c Ignore empty file path 11 years ago
Junegunn Choi 20ac8daeaa Update Vim plugin accordingly 11 years ago
Junegunn Choi abd07ffb9e Implement --no-sort options with some fixes 11 years ago
Junegunn Choi 03b204ec40 Initial commit 11 years ago