Commit Graph

76 Commits (37dc273148df0893053bf5cda0582a23f5c2b2d2)

Author SHA1 Message Date
Junegunn Choi 37dc273148
Micro-optimizations
- Make structs smaller
- Introduce Result struct and use it to represent matched items instead of
  reusing Item struct for that purpose
- Avoid unnecessary memory allocation
- Avoid growing slice from the initial capacity
- Code cleanup
8 years ago
Junegunn Choi 1e74dbb937
:hidden property of previous --preview-window should be cleared
Fix #636. Patch suggested by @edi9999.
8 years ago
Junegunn Choi 2bbc12063c
Add --preview and --preview-window
Close #587
8 years ago
Junegunn Choi 7ed9f83662
Validate jump label characters
Also extend default jump labels
8 years ago
Junegunn Choi c62fc5e75c
More named keys: F5 ~ F10, ALT-/ 8 years ago
Junegunn Choi 6d235bceee
Add jump and jump-accept actions for --bind
jump and jump-accept implement EasyMotion-like movement in fzf.
Suggested by @mhrebenyuk. Close #569.
8 years ago
Junegunn Choi 9078688baf Add print-query action for --bind
Close #571
8 years ago
Junegunn Choi dd4be1da38
Allow alt-enter and alt-space for --bind (#571) 8 years ago
Junegunn Choi 88a80e3c2c
Determine 256-color capability using tigetnum("colors")
Close #570
8 years ago
Junegunn Choi 2ccdf21a1f Add --hscroll-off=COL option
Close #513
8 years ago
Junegunn Choi e72a360337 Minor refactoring
- Slightly more efficient processing of Options
- Do not return reference type arguments that are mutated inside the
  function
- Use util.Constrain function when appropriate
8 years ago
Junegunn Choi f6c6e59a50 Add toggle-in and toggle-out for --bind
Related: #452

When `--multi` is set, tab key will bring your cursor down, and
shift-tab up. But since fzf by default draws the screen in bottom-up
fashion, one may feel that the opposite of the behavior is more
desirable and choose to customize the key bindings as follows.

    export FZF_DEFAULT_OPTS="--bind tab:toggle-up,shift-tab:toggle-down"

This configuration, however, becomes no longer straightforward when
`--reverse` is set and fzf switches to top-down layout. To address the
requirement, this commit adds `toggle-in` and `toggle-out` option which
switch direction depending on `--reverse`-ness.

    export FZF_DEFAULT_OPTS="--bind tab:toggle-out,shift-tab:toggle-in"
9 years ago
Junegunn Choi 8d3a302a17 Simplify Item structure
This commit compensates for the performance overhead from the
extended tiebreak option.
9 years ago
Junegunn Choi 1d2d32c847 Accept comma-separated list of sort criteria 9 years ago
Junegunn Choi 99ea1056ac Add --tabstop option
Related: https://github.com/junegunn/fzf.vim/issues/49
9 years ago
Junegunn Choi 1c20255504 Fix typos in help message
Close #425. Thanks to @blueyed.
9 years ago
Junegunn Choi a89d8995c3 Add execute-multi action
Close #413
9 years ago
Junegunn Choi 81a88693c1 Make --extended default
Close #400
9 years ago
Junegunn Choi f80ff8c917 Add bindable double-click event (#374) 9 years ago
Junegunn Choi a4eb3323da Fix #370 - Panic when trying to set colors when colors are disabled 9 years ago
Junegunn Choi 2022a3ad96 Replace --header-file with --header (#346)
and allow using --header and --header-lines at the same time.

Close #346.
9 years ago
Junegunn Choi 65d9d416b4 Change exit status (0: OK, 1: No match, 2: Error/Interrupted)
A la grep. Close #345
9 years ago
Junegunn Choi d0f2c00f9f Fix --with-nth performance; use simpler regular expression
Related #317
9 years ago
Junegunn Choi 766427de0c Fix --with-nth performance; avoid regex if possible
Close #317
9 years ago
Junegunn Choi 634670e3ea Lint 9 years ago
Junegunn Choi ee0c8a2635 Add --margin option
Close #299
9 years ago
Junegunn Choi 2bebddefc0 Do not print the entire --help on invalid option 9 years ago
Junegunn Choi fdbf3d3fec Replace eof action with cancel (#289) 9 years ago
Junegunn Choi 13e040baee Bind CTRL-D to the new delete-char/eof action
- CTRL-D - delete-char/eof
- DEL - delete-char
9 years ago
Junegunn Choi cc0d5539ba Add "eof" action which closes the finder only when input is empty
Close #289
9 years ago
Junegunn Choi f71ea5f3ea Add test cases for header and fix corner cases 9 years ago
Junegunn Choi f469c25730 Add --header-lines option 9 years ago
Junegunn Choi d01db4862b Update documentation 9 years ago
Junegunn Choi d459e9abce Add --header-file option 9 years ago
Junegunn Choi c9abe1b1ff Show more specific error message on invalid binding 9 years ago
Junegunn Choi a0e6147bb5 Fix #292 - Allow binding of colon and comma 9 years ago
Junegunn Choi a336494f5d 0.10.0 9 years ago
Junegunn Choi 8270f7f0ca Rename --null to --read0 and undocument the option
`--null` is ambiguous. For completeness' sake, we need both `--read0`
and `--print0`.

`--read0` only makes sense when the input contains multiline entries.
However, fzf currently cannot correctly display multiline entries,
I'm going to make `--read0` an undocumented feature.
9 years ago
Junegunn Choi c0d3faa84f Hide --toggle-sort from --help output
Since the same can be now achieved with --bind KEY:toggle-sort
9 years ago
Junegunn Choi 3492c8b780 Rename --history-max to --history-size
Considering HISTSIZE and HISTFILESIZE of bash
9 years ago
Junegunn Choi a8b2c257cd Improve handling of key names
Remember the exact string given as the key name so that it's possible to
correctly handle synonyms and print the original string.
9 years ago
Junegunn Choi 5e8d8dab82 More key names for --bind 9 years ago
Junegunn Choi fe4e452d68 Add --cycle option for cyclic scrolling
Close #266
9 years ago
Junegunn Choi d54a4fa223 Add key name "bspace" for --bind (bspace != ctrl-h) 9 years ago
Junegunn Choi 8677dbded1 Change alternative notation for execute action (#265)
e.g. fzf --bind "ctrl-m:execute:COMMAND..." --bind ctrl-j:accept
9 years ago
Junegunn Choi 794ad5785d Fix `.` to match newlines as well (#265) 9 years ago
Junegunn Choi fa5b58968e Add alternative execute notation that does not require closing char
This can be used to avoid parse errors that can happen when the command
contains the closing character. Since the command does not finish at
a certain character, the key binding should be the last one in the
group. Suggested by @tiziano88. (#265)

  e.g. fzf --bind "ctrl-m:execute=COMMAND..." --bind ctrl-j:accept
9 years ago
Junegunn Choi 7db53e6459 Add synonyms for some keys to be used with --bind and --toggle-sort
enter (return), space, tab, btab, esc, up, down, left, right
9 years ago
Junegunn Choi 022435a90a More alternative notations for execute action
execute(...)
    execute[...]
    execute~...~
    execute!...!
    execute@...@
    execute#...#
    execute$...$
    execute%...%
    execute^...^
    execute&...&
    execute*...*
    execute:...:
    execute;...;
    execute/.../
    execute|...|
9 years ago
Junegunn Choi 6c99cc1700 Add bind action for executing arbitrary command (#265)
e.g. fzf --bind "ctrl-m:execute(less {})"
     fzf --bind "ctrl-t:execute[tmux new-window -d 'vim {}']"
9 years ago