shougo / neomru.vim Goto Github PK
View Code? Open in Web Editor NEWMRU plugin includes unite.vim/denite.nvim MRU sources
License: Other
MRU plugin includes unite.vim/denite.nvim MRU sources
License: Other
I have just installed neomru with Unite master, and got the following error.
The Unite buffer itself showed up then, but without any previous mru entries (from unite itself). Is the existing data meant to be migrated automatically?
function 178_call_unite_empty..unite#start..unite#start#standard..unite#candidates#_recache..unite#helper#call_hook..540, line 2
Vim(if):E716: Key not present in Dictionary: abbr !~ '/$'
[unite.vim] Error occured in calling hook "on_post_filter"!
[unite.vim] Source name is directory_mru
Hi, I'm getting this error in NVIM 0.1.2 on OSX 10.11.
Error detected while processing function <SNR>51_append..neomru#_append..67..64:
line 9:
E688: More targets than List items
I can produce it by opening or switching buffers (:e foo
). A minimal .vimrc:
set nocompatible
set runtimepath+=~/.vim/bundle/neomru.vim
Without neomru in the .vimrc, the errors don't appear. I've tried deleting and reinstalling neomru without success, on the disk or through NeoBundle.
This started after a system disk filled up and NVIM was unable to write files to disk.
Thanks!
Is there an easy way to remove the current file from the mru list? Often, if I bring up mru, I do not wish to navigate to the current file and would prefer that the list just start with the file right before the current one.
Is this something that is easily done with unite or would it require hacking on neomru?
This not an issue, just a question.
I set the NeoMRU time format:
let g:neomru#time_format = '%Y-%m-%d'
But on the Denite interface I get the same output. From what I could gather in the documentation, this was supposed to show the file modification date in the Denite interface? Is there a special setting for this or am I misunderstanding this feature?
Create test directory and two empty files:
cd ~
mkdir mru-test
cd mru-test
touch test1
touch test2
Now consider the following minimal vimrc file:
set nocompatible
let &rtp = '~/.vim/bundle/unite.vim,' . &rtp
let &rtp = '~/.vim/bundle/neomru.vim,' . &rtp
filetype plugin indent on
syntax enable
let g:neomru#file_mru_path = '~/mru-test/file'
let g:neomru#directory_mru_path = '~/mru-test/directory'
Now:
vim -u vimrc test1
in one terminal.vim -u vimrc test2
in a second terminal. Then quit.test1
Vim session.cat file
-> cat file
0.3.0
/home/lervag/mru-test/test1
For some reason, the test2
file is forgotten. That is, I would expect this to be:
-> cat file
0.3.0
/home/lervag/mru-test/test1
/home/lervag/mru-test/test2
Although both the Unite and the neomru docs mention theses sources, they do not actually exist – they are not listed in :Unite source
, and calling one gets you:
unite.vim: Invalid source name "neomru/file" is detected.
[unite.vim] unite.vim: Invalid source
As I’m not sure if that is an intentional omission and the docs are just out of sync, I prefer not to submit a doc PR.
Would it be possible to integrate neomru with the command line? So all the files I send to commands or directories I visit in the command line are also shown in neomru?
Consider the following minimal vimrc:
set nocompatible
let $ONEDRIVE_HOME = expand('C:/OD/Users/Pedro')
let $DOTVIM = expand('$ONEDRIVE_HOME/vimfiles')
let $CACHE = expand('$DOTVIM/cache')
set runtimepath+=$DOTVIM/bundle/ultisnips/
set runtimepath+=$DOTVIM/bundle/neomru/
set runtimepath+=$DOTVIM/bundle/unite/
filetype plugin indent on
let g:UltiSnipsSnippetDirectories = [$DOTVIM . '\testsnippet']
call unite#custom#profile('default', 'context', { 'start_insert' : 1 })
let g:neomru#file_mru_path = $CACHE . '/plugins/unite/mru/file'
where the $DOTVIM\testsnippet
directory contains only the file python.snippets
:
snippet inp "Import numpy" b
${1:import numpy as np}$0
endsnippet
Now, as in the GIF, do the following:
i) Open Gvim and run :e C:\Users\Pedro\Desktop\foo.py
ii) Get into insert mode and type inp
+ <TAB>
(to expand the snippet)
iii) Once the snippet expands press <BACKSPACE>
to delete the visual text.
iv) Press <ESC>
to exit insert mode and then run :Unite neomru/file
v) When the Unite buffer opens press <DOWN>
(down arrow key) three times
You will see that Gvim freezes after pressing <DOWN>
the second time (i.e I cannot reach the third candidate).
After commit 9e64b5f when I run Unite neomru/files
I get:
[unite.vim] function <SNR>1_YankOutput[3]..<SNR>68_call_unite[33]..unite#start[1]..unite#start#standard[50]..unite#candidates#_recache[74]..<SNR>127_recache_candidates_loop[42]..<SNR>127_get_source_candidates[40]..unite#helper#ignore_candidates[4]..unite#filters#vim_filter_pattern, line 1
[unite.vim] Vim(return):E735: Can only compare Dictionary with Dictionary
[unite.vim] Error occurred in gather_candidates!
@Shougo Thank for your work of this plugin, and I am using denite with it, now I also using gina.vim, but when I run Denite file_mru
I alway see gina plugin buffer in it. I think mru should skip these plugin buffer:
(Invalid)gina://Github.vim:commit
Hello,
I have couple of questions about unite and unite mru.
Many thanks
I have the Most Recently Used plugin.
So I have 2 plugins installed, MRU and Neomru.
I changed the Neomru update interval to 200 seconds with:
let g:neomru#update_interval = 200
But I'm not statistified with the update interval. I'm often switching to :MRU
, when Unite/Neomru can't find the file that I opened earlier. I believe the MRU-plugin don't know any update interval. It will only write when a file is opened. Then MRU-plugin writes the opening file directly to their file.
I have this in the following settings:
let MRU_File = 'C:\Dropbox\Vim.vim\files-MRU\Desktop_vim_mru_files'
let g:neomru#file_mru_path='C:\Dropbox\Vim.vim\files-MRU\Desktop_neo_mru_files'
let g:neomru#directory_mru_path='C:\Dropbox\Vim.vim\files-MRU\Desktop_neo_mru_directory'
I notice the structure of MRU
plugin is exactly the same as the structure of Neomru.
So I'm wondering, is it possible to change the path of Unite Neomru to the file from MRU? So Unite/Neomru will read from the list from MRU, instead Neomru?
Summary: is it possible to use MRU source instead Neomru with Unite. They're stored in same folder.
Gvim x64.
:Unite -buffer-name=MRU -toggle -prompt-direction=top -start-insert bookmark neomru/file
When I create and write a new file, it isn't added to the MRU list. To reproduce:
:e test.txt<CR>
ZZ
Adding BufWritePost
to the autocmd calling s:append
fixes the issue.
You can run :Denite unite:directory_mru
but it would be more consistent with file_mru
as that can just be run with :Denite file_mru
Hello,
Updated vim and plugins this AM.
I see this error has occurred before.
Error detected while processing function <SNR>41_append[6]..neomru#_append[13]..411[1]..409[20]..412:
line 1:
E892: Using a String as a Float
E892: Using a String as a Float
Happens on any action.
MacOS 10.15.3
This plugin also contains a denite source. So the project description on github should include that.
Someone interested in this could give it a spin. I just imported them manually.
:h v:oldfiles
Hi Shougo,
Do you have the similar issue?
If I run Unite -quick-match file_mru<cr>
the mru window shows but no quick match keys show. quick-match buffer
works OK. I use the latest Unite
and neomru
Thanks,
I have the following in my vimrc
let $DOTVIM = expand('~/vimfiles')
let g:neomru#file_mru_path = $DOTVIM.'/cache/plugins/unite'
However the mru file is still written in the default directory:
'~/.cache/neomru/file'
An unrelated question: is there an equivalent to
let g:unite_source_file_mru_long_limit = 2000
Thanks in advance.
I'm using denite#custom#action()
to add special handling in some cases, and even though the file isn't open on Vim I'd like to add it to the mru list.
Is there any way to do it? Or is it necessary to expose s:mru.append(path)
I found that neomru/file
source only records files under my home directory. For example:
$ cat ~/.cache/neomru/file 0.3.0 /home/roy_chen/.vim/bundle/neomru.vim/plugin/neomru.vim /home/roy_chen/.vim/bundle/neomru.vim/doc/neomru.txt /home/roy_chen/tmp/t.c /home/roy_chen/bitbucket/roycyt/dotfiles/vim/vimrc
When I open files in /tmp
or /media
, ..., these information does not get recorded.
Hi,
I just found out that NeoMRU ignores files in /mnt/
(https://github.com/Shougo/neomru.vim/blob/master/autoload/neomru.vim#L69).
How can I stop that behaviour?
I tried this:
let g:unite_source_file_mru_ignore_pattern = substitute(g:neomru#file_mru_ignore_pattern, '|\/mnt\/\\', '', '')
But it didn't work.
Also I'm not sure if this is the right approach as the docs say This variable is deprecated. Please use unite#custom#source() instead.
but that sounds to me like a way of filtering what results show up, not what files get saved in $XDG_CACHE_HOME/neomru/file
.
I know I can change it myself but I think it would be more appropriate to have ~/.local/share/nvim/neomru
as the default directory because the MRU list is quite essential. I would be quite annoyed if it was gone, it is frustrating to build it again.
Also, Neovim stores the Shada file in $XDG_DATA_HOME/nvim/shada/main.shada
. While the purpose of the MRU list is different from the Shada file, I think they are close enough to make the comparison. Data about what the user is doing should be stored in $XDG_DATA_HOME
.
Unite, neomru ともに最新版にしています。
ターミナルで,
$ vim -u $HOME/.vimrc.minimal -i NONE {ファイル名}
などとして既存のファイルを開いて,:Unite file_mru
を実行すると,起動時に引数に与えたファイルだけしか候補に出てきません。このあとuniteをq
キーで終了して,:NeoMRUReload
を実行してから,:Unite file_mru
を実行すると正常に他の候補も表示されます。
$ vim -u $HOME/.vimrc.minimal -i NONE {存在しないファイル}
また,このように,起動時の引数に存在しないファイル名を与えたり(新規作成),ファイル名を与えずに起動したりしたときは,:Unite file_mru
で正常に候補が出ています。
$HOME/.vimrc.minimal は以下のとおりです。
if &compatible | set nocompatible | endif
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
endif
call neobundle#rc('~/.vim/bundle')
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/neomru.vim'
filetype plugin indent on
syntax enable
vim のバージョン情報も添付します。
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 7 2014 20:35:18)
MacOS X (unix) 版
適用済パッチ: 1-133
Compiled by sakamoto@macbook
Huge 版 with MacVim GUI. 機能の一覧 有効(+)/無効(-)
+acl +find_in_path +mouse_netterm +syntax
+arabic +float +mouse_sgr +tag_binary
+autocmd +folding -mouse_sysmouse +tag_old_static
+balloon_eval -footer +mouse_urxvt -tag_any_white
+browse +fork() +mouse_xterm -tcl
++builtin_terms +fullscreen +multi_byte +terminfo
+byte_offset +gettext +multi_lang +termresponse
+cindent +guess_encode -mzscheme +textobjects
+clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +odbeditor +toolbar
+cmdline_compl +insert_expand +path_extra +transparency
+cmdline_hist +jumplist +perl/dyn +user_commands
+cmdline_info +keymap +persistent_undo +vertsplit
+comments +kaoriya +postscript +virtualedit
+conceal +langmap +printer +visual
+cryptv +libcall +profile +visualextra
+cscope +linebreak +python/dyn +viminfo
+cursorbind +lispindent +python3/dyn +vreplace
+cursorshape +listcmds +quickfix +wildignore
+dialog_con_gui +localmap +reltime +wildmenu
+diff +lua/dyn +rightleft +windows
+digraphs +menu +ruby/dyn +writebackup
+dnd +migemo +ruby19/dyn -X11
-ebcdic +mksession +scrollbind -xfontset
+emacs_tags +modify_fname +signs +xim
+eval +mouse +smartindent -xsmp
+ex_extra +mouseshape -sniff -xterm_clipboard
+extra_search +mouse_dec +startuptime -xterm_save
+farsi -mouse_gpm +statusline -xpm
+file_in_path -mouse_jsbterm -sun_workshop
システム vimrc: "$VIM/vimrc"
ユーザ vimrc: "$HOME/.vimrc"
第2ユーザ vimrc: "~/.vim/vimrc"
ユーザ exrc: "$HOME/.exrc"
システム gvimrc: "$VIM/gvimrc"
ユーザ gvimrc: "$HOME/.gvimrc"
第2ユーザ gvimrc: "~/.vim/gvimrc"
システムメニュー: "$VIMRUNTIME/menu.vim"
省略時の $VIM: "
/usr/local/Cellar/macvim-kaoriya/HEAD/MacVim.app/Contents/Resources/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-un
known-pragmas -pipe -DMACOS_X_UNIX -mmacosx-version-min=10.8 -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1
リンク: clang -L. -fstack-protector -L. -fstack-protector -L. -L. -mmaco
sx-version-min=10.8 -headerpad_max_install_names -L/usr/local/lib -o Vim -framew
ork Cocoa -framework Carbon -lncurses -liconv -lintl -lmigemo -framework C
ocoa -pagezero_size 10000 -image_base 100000000 -pagezero_size 10000 -image_ba
se 100000000 -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/da
rwin-thread-multi-2level/CORE -lm -lutil -lc
Is it possible to implement functionality that allows to automatically remove duplicated paths from mru files?
Hi there - is it possible to configure neomru / unite to ignore the project path when matching MRU files?
For example, my project path is "/Users/jon/Developer/web". My MRU list then contains a lot of files like :
/Users/jon/Developer/web/foo
/Users/jon/Developer/web/blah/bar
/Users/jon/Developer/web/lib/baz
...
As a result, when I try to find an MRU file, it matches any of the characters in "/Users/jon/Developer/web". I'd like it to only consider characters from the path relative to the project directory - eg
foo
blah/bar
lib/baz
...
I can use the converter_relative_abbr
to affect the display of those filenames, but that doesn't affect the name that's matched, right?
Why need python support?
This is a small function...
Hello.
Recently updated Vim and plugins, now I get the error:
:Denite file_mru<CR>
Vim v8.1 (985), Python 3.7.2
ui.start(args[0], context)
[denite] File "C:\Users\Alex\.vim\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\ui\default.py", line 76, in start
[denite] self._start(context['sources_queue'][0], context)
[denite] File "C:\Users\Alex\.vim\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\ui\default.py", line 135, in _start
[denite] self.gather_candidates()
[denite] File "C:\Users\Alex\.vim\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\ui\default.py", line 666, in gather_candidates
[denite] self._denite.gather_candidates(self._context)
[denite] File "C:\Users\Alex\.vim\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\denite.py", line 63, in gather_candidates
[denite] source.context, source)
[denite] File "C:\Users\Alex\.vim\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\denite.py", line 279, in _gather_source_candidates
[denite] candidates = source.gather_candidates(context)
[denite] File "c:\users\alex\.vim\dein\.cache\vimrc\.dein\rplugin\python3\denite\source\file_mru.py", line 35, in gather_candidates
[denite] 'neomru#_get_mrus().file.'
[denite] vim.error: Vim(if):E892: Using a String as a Float
echo neomru#_get_mrus().file.gather_candidates([], {"is_redraw": 0})
E892: Using a String as a Float
-1
NVim v0.4.0-320-g018e0d5a1
Works fine
Hi Shougo,
this function is causing extreme slowness, when opening mru, but also when switching between other buffers.
Is it possible to make some switch that could turn off this functionality?
function! s:is_file_exist(path) abort "{{{
let ignore = !empty(g:neomru#file_mru_ignore_pattern)
\ && a:path =~ g:neomru#file_mru_ignore_pattern
return !ignore && (getftype(a:path) ==# 'file' || a:path =~ '^\h\w+:')
endfunction"}}}
In s:mru.version_check
, String type and Float type are compared, which causes the following error:
Error detected while processing function <SNR>41_append[6]..neomru#_append[4]..neomru#append[29]..23[1]..21[20]..24:
line 1:
E892: Using a String as a Float
E892: Using a String as a Float
This is the location of the comparison mentioned above.
neomru.vim/autoload/neomru.vim
Lines 236 to 237 in 0126deb
This is the original definition of self.version
.
neomru.vim/autoload/neomru.vim
Line 28 in 0126deb
Steps to reproduce the issue:
:e something.txt
Environment:
I've use let g:neomru#do_validate = 0
to make my vim faster, but after read through the documentation, I can't find the command to validate the files.
Hi!
I have this:
call unite#custom#source(
\ 'neomru/file', 'matchers',
\ ['matcher_project_files', 'matcher_fuzzy', 'converter_relative_word'])
nnoremap [unite]f :Unite -buffer-name=files -profile-name=ignorecase -start-insert neomru/file file_rec/async:!<cr>
And this gives me a list which looks like this
neomru/file Users/linus/projects/myproject/app/models/user.rb
file_rec/async! app/models/article.rb
file_rec/async! app/models/whatever.rb
Can I show the neomru/file paths relative to my project? Like file_rec/async! does? It is a bit annoying to see those long paths.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.