Commit Graph

204 Commits (aa0e10ead71cd9995bf6d6a01799e52551895816)

Author SHA1 Message Date
Jan Edmund Lazo aa0e10ead7 [vim] Use cterm colors on Windows (#1793)
Truecolor does not work on default Windows terminal.
It is a problem in neovim GUIs.

https://github.com/sainnhe/edge/issues/5#issuecomment-565748240
5 years ago
msr1k a9906c7c29 Add MSYS2 support as a vim plugin (#1677)
* Add MSYS2 support as a vim plugin

Add &shellcmdflag and TERM environment variable treatment.

- Make &shellcmdflag `/C` when &shell turns into `cmd.exe`
- Delete %TERM% environment variable before fzf execution

* Change shellescape default value depending on s:is_win flag

* Make TERM environment empty only when gui is running

* Stop checking &shell in fzf#shellescape function

This funcion's behavior is controlled by only if it is Windows or not.
So there is no need to check &shell.

* Take neovim into consideration when to set shellcmdflag

* Add &shellxquote control
5 years ago
Junegunn Choi f68017d21e [windows/vim] Encode batchfile in current codepage
Backport https://github.com/junegunn/vim-plug/pull/913
5 years ago
Marco Hinz 16fc6862a8 [nvim] Handle SIGHUP in exit handler (#1749)
In recent Nvim versions, an "Error running ..." message is shown even for normal
use cases, such as:

    :Files
    <c-\><c-n>
    :close

Closing the window will :bwipeout! the terminal buffer, because fzf sets
bufhiden=wipe.

When deleting the terminal buffer while fzf is still running, Nvim sends SIGHUP.
This happens for quite some time already, but the bug only manifests since this
commit:

  https://github.com/neovim/neovim/commit/939d9053b

It's The Right Thing to do when the application exited due to a signal.

Before that commit, no "Error running ..." message was shown, because 1 (instead
of 128 + 1 == SIGHUP) was returned which the exit handler in fzf.vim treats as
"NO MATCH".
5 years ago
Junegunn Choi 6390140539
[vim/windows] Use chcp only if sed is in PATH
https://github.com/junegunn/vim-plug/pull/891
5 years ago
Junegunn Choi 3089880f18
[vim/windows] Fix chcp parsing for the current codepage
https://github.com/junegunn/vim-plug/pull/888
5 years ago
Junegunn Choi ab11b74be4
[vim] Output of chcp was not parsed correctly
By @gh4w and @janlazo

See 68b31a4a66
5 years ago
Junegunn Choi 80b5bc1b68
[vim] Shell-escape `--color` option generated by fzf#wrap
Fix https://github.com/junegunn/fzf.vim/issues/855
5 years ago
charlton1 c1dbc800e5 [vim] Fix name-based colors for GVim/8.0 w/o builtin terminal (#1634)
(i.e. spawn xterm)
5 years ago
Junegunn Choi e7d60aac9c
[vim] Do not restore cwd when autochdir is set and buffer changed
Close #1539
5 years ago
Junegunn Choi a0bfbdd49c
[vim] Increase window height by 2 when --border is set
Close #1535
5 years ago
Junegunn Choi 8c6fcee3ca
[vim] Fix directory switching around sink function
Close #1356

Related:
- #612
- https://github.com/junegunn/fzf.vim/issues/308
6 years ago
Junegunn Choi 13803d0dbb
[vim] Clear temporary window-local working directory
Close #1085
Close #1086
Close https://github.com/junegunn/fzf.vim/issues/678
6 years ago
Jan Edmund Lazo cce17ad0a0 [vim] Use CRLF in batchfile for multibyte codepage (#1289)
Close #1288
6 years ago
Junegunn Choi 6eac4af7db
[vim] Ignore Vim:Interrupt when "Abort" selected on E325
Close #1268
6 years ago
Junegunn Choi eb3afc03b5
[vim] Make list options compatible with layout options
Fix #1205
6 years ago
Junegunn Choi 5c34ab6692
[vim] Fix terminal buffer cleanup on Vim 8
Close #1172
7 years ago
Junegunn Choi 54a026525a
[vim] Remove unnecessary term_wait workaround
The issue is fixed in 1232624ae5
7 years ago
Jan Edmund Lazo 37d4015d56 [vim] Don't use :terminal on msys2 or Cygwin (#1155)
Close #1152

msys2 terminal Vim assumes that it runs in mintty
so `:terminal` uses `TERM=xterm`.
fzf doesn't support `TERM=xterm` on Windows.
7 years ago
Junegunn Choi c2614467cf
[neovim] Fix Neovim plugin to use terminal instead of --height
Close #1066
Close #1068
7 years ago
Junegunn Choi 077ae51f05
[vim] Use Vim 8 terminal when appropriate
Close #1055
7 years ago
Jan Edmund Lazo 79d2ef4616 [vim] Do not pathshorten prompt in cygwin (#1043)
Prevents the following case:
before pathshorten - /usr/bin
after pathshorten - /u/bin
piped to cmd.exe - U:/bin
7 years ago
Junegunn Choi 5edc3f755c
[vim] Update FZF command not set up lengthy prompt on narrow screen
Port of e7928d154a

Since :FZF does not enable preview window, we determine based on full
&columns instead of &columns / 2.
7 years ago
Jan Edmund Lazo 26d7896877 [vim] Bind Ctrl-J in Vim terminal to fix enter key
Temporary workaround for non-Windows environment

Reference:
https://github.com/vim/vim/issues/1998
https://github.com/junegunn/fzf/pull/1019#issuecomment-327008348
7 years ago
Jan Edmund Lazo fd6bc7308f [vim] Use s:execute_term in Windows
IMPORTANT:
cmd.exe and powershell are fine in default Windows terminal.
cmd.exe prompt is broken on ConEmu because it natively supports ucs-2 only.
utf-16 support is exclusive to .Net (ie. powershell).
utf-8 supports requires chcp, external program, but does not fix the cmd.exe prompt.
Use powershell on ConEmu to avoid corrupted text on display
7 years ago
Jan Edmund Lazo 6c41c95f28 [vim] s:execute_term works in GVim on Windows
Requirements:
- compiled with +terminal
- has patch-8.0.995
- has('gui_running') returns 1
7 years ago
Jan Edmund Lazo 446e04469d [neovim] use batchfile for s:execute_term in Windows 7 years ago
Michael Smith 5097e563df [neovim] Fix terminal buffer marker on Windows
Original Patch: a9bf29b65e
7 years ago
Jan Edmund Lazo c7ad97c641 [neovim] use terminal in Windows for v0.2.1+ 7 years ago
Junegunn Choi 48adad5454
[neovim] Set &shell to sh (again) after opening a new window
Close #1031
7 years ago
Jack O'Connor b27dc3eb17 [vim] Add parens around piped source commands (#1029)
Previously a command like `echo a && echo b` would get transformed into
`echo a && echo b | fzf`, which only pipes the output of the second
command. Adding parentheses around the source command avoids this issue,
and works on both Unix and Windows.
7 years ago
Junegunn Choi e825b07e85
[neovim] Allow running FZF in multiple windows
Close #1023
7 years ago
Jan Edmund Lazo 3399e39968 [vim] Escape backslashes in fzf#shellescape (#1021) 7 years ago
Junegunn Choi 2069bbc8b5
[vim] Allow Funcref in g:fzf_action
https://github.com/junegunn/fzf.vim/issues/185
7 years ago
Junegunn Choi 462c68b625
[vim] Fix issues with other plugins changing working directory
Close #1005
7 years ago
Jan Edmund Lazo 1fcc07e54e
[vim] Fix escape of backslash in s:shortpath
Close #1000
7 years ago
Junegunn Choi a2604c0963
[nvim] Disable number in fzf buffer
https://github.com/junegunn/fzf.vim/issues/396#issuecomment-317214036

One can override the setting on FileType fzf autocmd.
7 years ago
Junegunn Choi 7727ad43af
[vim] Use fnameescape to escape command line arguments
Fix https://github.com/junegunn/fzf.vim/issues/404

Thanks to @janlazo.
7 years ago
Jan Edmund Lazo 940214a1a2 [neovim] Fix lcd when fzf job exits on Windows (#970)
Related: #960 (relative filepaths)
7 years ago
Jan Edmund Lazo 68bd410159 [vim] Don't pipe FZF_DEFAULT_COMMAND in Windows (#969)
Related #960, #552
7 years ago
Junegunn Choi 5efdeccdbb
[vim] Expand 'dir' on Cygwin to handle Windows-style paths
See https://github.com/junegunn/fzf/pull/933#discussion_r120011934

Close https://github.com/junegunn/fzf.vim/pull/386
7 years ago
Jan Edmund Lazo 7e483b0c25 [vim] Add support for Cygwin (#933) 7 years ago
Junegunn Choi 773133c4ce
[vim] Allow running install --bin on Cygwin 7 years ago
Junegunn Choi 35d407021c
[vim] Replace invalid s:escape calls with fzf#shellescape 7 years ago
Junegunn Choi 076f49d447
[vim] Make sure to delete temporary batchfile on Windows 7 years ago
Junegunn Choi 0665fe0413
[vim] Remove unnecessary ternary expression
Related: https://github.com/junegunn/fzf.vim/issues/378
7 years ago
Jan Edmund Lazo 669a6fee40 [vim] Use utf-8 for cmd.exe (#929) 7 years ago
Jan Edmund Lazo 8aab0fc189 [vim] Replace s:fzf_shellescape and s:shellesc with fzf#shellescape (#916) 7 years ago
Junegunn Choi 3a5086796d
[vim] Prevent 'wildignore' from affecting expand() (#917) 7 years ago
Junegunn Choi 11300913a4
[vim] Do not expand s:fzf_go
expand() may return an empty string depending on the value of
&wildignore. Since expand('<sfile>') always returns an absolute path, we
can remove expand() call here. Close #917.
7 years ago