All Projects → tweekmonster → Fzf Filemru

tweekmonster / Fzf Filemru

File MRU with fzf.vim

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Fzf Filemru

fzf-folds.vim
Vim plugin that lets you fuzzy search for folds in a file
Stars: ✭ 15 (-80.26%)
Mutual labels:  vim-plugin, fzf
Tmux Complete.vim
Vim plugin for insert mode completion of words in adjacent tmux panes
Stars: ✭ 447 (+488.16%)
Mutual labels:  vim-plugin, vim-plugins
Pear Tree
A Vim auto-pair plugin that supports multi-character pairs, intelligent matching, and more
Stars: ✭ 327 (+330.26%)
Mutual labels:  vim-plugin, vim-plugins
vim-js-file-import
Import/require files in javascript and typescript with single button!
Stars: ✭ 130 (+71.05%)
Mutual labels:  vim-plugin, vim-plugins
Vim Systemd Syntax
Syntax highlighting for systemd service files in Vim.
Stars: ✭ 57 (-25%)
Mutual labels:  vim-plugin, vim-plugins
bufstop
Fast and efficient buffer switching for Vim
Stars: ✭ 82 (+7.89%)
Mutual labels:  vim-plugin, vim-plugins
Nerdcommenter
Vim plugin for intensely nerdy commenting powers
Stars: ✭ 4,454 (+5760.53%)
Mutual labels:  vim-plugin, vim-plugins
vim-inccomplete
Vim plugin for #include directive completion.
Stars: ✭ 14 (-81.58%)
Mutual labels:  vim-plugin, vim-plugins
Vimcompletesme
You don't Complete Me; Vim Completes Me! A super simple, super minimal, super light-weight tab completion plugin for Vim.
Stars: ✭ 752 (+889.47%)
Mutual labels:  vim-plugin, vim-plugins
Context.vim
Vim plugin that shows the context of the currently visible buffer contents
Stars: ✭ 688 (+805.26%)
Mutual labels:  vim-plugin, vim-plugins
vim-tmuxlike
A vim plugin that mimics the actions of tmux. 像操作Tmux一样操作Vim
Stars: ✭ 20 (-73.68%)
Mutual labels:  vim-plugin, vim-plugins
Notational Fzf Vim
Notational velocity for vim.
Stars: ✭ 975 (+1182.89%)
Mutual labels:  fzf, vim-plugin
vim-bettergrep
A better way to grep in vim.
Stars: ✭ 15 (-80.26%)
Mutual labels:  vim-plugin, vim-plugins
vim-hugo-helper
A small Vim plugin with a set of helpers for Hugo https://gohugo.io
Stars: ✭ 82 (+7.89%)
Mutual labels:  vim-plugin, vim-plugins
VimConfig
Configuration files for Vi-IMproved.
Stars: ✭ 23 (-69.74%)
Mutual labels:  vim-plugin, vim-plugins
Vim Markdown Toc
A vim 7.4+ plugin to generate table of contents for Markdown files.
Stars: ✭ 427 (+461.84%)
Mutual labels:  vim-plugin, vim-plugins
fzf-preview.vim
fzf ❤️ preview
Stars: ✭ 49 (-35.53%)
Mutual labels:  vim-plugin, fzf
fzf-checkout.vim
Manage branches and tags with fzf
Stars: ✭ 187 (+146.05%)
Mutual labels:  vim-plugin, fzf
Alchemist.vim
Elixir Integration Into Vim
Stars: ✭ 632 (+731.58%)
Mutual labels:  vim-plugin, vim-plugins
Hot Reload.vim
A (Neo)vim plugin for Flutter to automatically hot reload the project every time a file is saved
Stars: ✭ 33 (-56.58%)
Mutual labels:  vim-plugin, vim-plugins

FZF File MRU

Vim plugin that tracks your most recently and frequently used files while using the fzf.vim plugin.

Sweet FZF MRU GIF

This plugin provides the FilesMru and ProjectMru commands, which are basically a pass-throughs to the Files command. So, all you really need to do is use FilesMru instead of Files.

When using FilesMru or ProjectMru, FZF will display files like usual, except your most recently used files (matching the working directory) will appear before all other files.

ProjectMru does the same thing as FilesMru except that it uses git ls-tree to display files after MRU files (and before other found files), and ignores repository submodule directories.

UpdateMru is a utility command that allows you to manually update the MRU.

MRU files are tracked in $XDG_CACHE_HOME/fzf_filemru. A timestamp (rounded to 2 minute intervals) and selection count is used to determine recency and frequency.

Example Usage

nnoremap <c-p> :FilesMru --tiebreak=end<cr>

The MRU list is updated when a file is saved or selected from the FZF menu. Though not recommended, you could update the MRU list when a file is opened by other means with the following script:

augroup custom_filemru
  autocmd!
  autocmd BufWinEnter * UpdateMru
augroup END

Requirements

  • fzf.vim
  • bash
  • awk
  • GNU or MacOS date (supporting the %s format option)

Command Usage

The commands ignore the original directory argument and instead takes flags that are passed FZF. Run fzf --help to see what flags you can pass. A decent flag to use is --tiebreak=index which uses the initial order of the listed file as a secondary sort. --tiebreak=end will do a better job of sorting filename matches first.

Options

  • g:fzf_filemru_bufwrite - Update the MRU on BufWritePost. This can be useful if you want your most saved files to appear near the top of the results. Default: 0
  • g:fzf_filemru_git_ls - Use git ls-tree to display repo files before other files that are found with the the finder command. Always enabled for ProjectMru. Default: 0
  • g:fzf_filemru_ignore_submodule - Ignore git submodule directories. Always enabled for ProjectMru. Default: 0
  • g:fzf_filemru_colors - Colors for file prefixes. Uses the xterm 256 color palette. Default: {'mru': 6, 'git': 3}.

Note: Even if git submodule files are ignored, they can still appear in the MRU.

Command Line

You can use bin/filemru.sh directly from the command line. It will act as fzf for finding files, but will update the MRU with your file selections. This is currently not useful in the shell on its own.

Command Line Switches

  • --exclude - Exclude a file from MRU output. Must be relative to the current directory.
  • --files | Just find files with MRU files displayed first and exit.
  • --update | Updates the MRU with the files specified after this switch. The files must be relative to the current directory.
  • --git | Use git ls-tree to display repo files after MRU files, but before other found files.
  • --ignore-submodules | Ignore git submodule directories.
  • --mru-color | Color for the MRU prefix.
  • --git-color | Color for the Git prefix.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].