Files opened from denite grep buffer sometimes open in defx buffer instead of buffer with a file.
Files opened from denite grep buffer always open in active buffer.
:checkhealth
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: Release
## Remote Plugins
- OK: Up to date
## terminal
- INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
- INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
- INFO: $COLORTERM='rxvt'
health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: xsel
## Python 2 provider (optional)
- INFO: `g:python_host_prog` is not set. Searching for python2 in the environment.
- INFO: Multiple python2 executables found. Set `g:python_host_prog` to avoid surprises.
- INFO: Executable: /usr/bin/python2
- INFO: Other python executable: /bin/python2
- INFO: Python2 version: 2.7.15
- INFO: python2-neovim version: 0.3.0
- OK: Latest python2-neovim is installed: 0.3.0
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Multiple python3 executables found. Set `g:python3_host_prog` to avoid surprises.
- INFO: Executable: /usr/bin/python3
- INFO: Other python executable: /bin/python3
- INFO: Python3 version: 3.7.0
- INFO: python3-neovim version: 0.3.0
- OK: Latest python3-neovim is installed: 0.3.0
## Ruby provider (optional)
- INFO: Ruby: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
- INFO: Host: ~/.gem/ruby/2.5.0/bin/neovim-ruby-host
- OK: Latest "neovim" gem is installed: 0.7.1
## Node.js provider (optional)
- INFO: Node.js: v10.12.0
- INFO: Neovim node.js host: /usr/lib/node_modules/neovim/bin/cli.js
- OK: Latest "neovim" npm/yarn package is installed: 4.2.1
health#defx#check
========================================================================
## defx.nvim
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
set runtimepath+=~/.local/share/nvim/plugged/defx.nvim/
set runtimepath+=~/.local/share/nvim/plugged/denite.nvim/
nnoremap <C-P> :Defx -toggle -split=vertical -winwidth=40 .<CR>
nnoremap <C-F> :Denite -post-action=suspend -auto-resume grep:::
The reproduce ways from neovim/Vim starting (Required!)
- Before starting neovim prepare a directory with 4 files containing 'test', e.g.
'mkdir /tmp/defx; for f in /tmp/defx/t{1,2,3,4}; do echo "test" > $f; done
- Hit
<C-p>
to open Defx in project drawer mode
- Switch to right buffer (
<C-w>l
)
- cd to your directory with files from 0 -
:cd /tmp/defx
<C-f>test<CR>
to open denite grep using 'test'
<CR>
- t4.txt opens in edit buffer - OK
- Open next file:
<C-w>j<C-g><CR>
- t3.txt opens in edit buffer - OK
- Open next file:
<C-w>j<C-g><CR>
- t2.txt opens in Defx buffer - NOT OK
Screen shot (if possible)
Upload the log file
https://gist.githubusercontent.com/azhi/55a0af02829a0f508a129cd08ba907d1/raw/6a346ee089d2680004e802b46c58db33a58bdef6/log_py3_rplugin
Consider the following minimal init.vim
:
set nocompatible
let $DOTVIM = expand('$HOME/.config/nvim')
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/defx.nvim
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/vimfiler
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/unite.vim
set splitright
set splitbelow
call defx#custom#option('_', {
\ 'winwidth': 40,
\ 'split': 'vertical',
\ 'direction': 'topleft',
\ })
call vimfiler#custom#profile('default', 'context', {
\ 'direction' : 'topleft',
\ 'split': 1,
\ 'winwidth' : 40,
\ 'force_quit': 1,
\ })
nnoremap <silent> ,xfe :Defx<CR>
nnoremap <silent> ,fe :VimFilerBufferDir<CR>
augroup ps_defx_vimfiler
au!
au FileType defx call s:defx_settings()
au FileType vimfiler call s:vimfiler_settings()
augroup END
function! s:defx_settings()
" nnoremap <silent><buffer><expr> <CR> defx#do_action('open')
nnoremap <silent><buffer><expr> <CR> defx#do_action('drop')
nnoremap <silent><buffer><expr> s defx#do_action('open', 'split')
nnoremap <silent><buffer><expr> v defx#do_action('open', 'vsplit')
nnoremap <silent><buffer><expr> q defx#do_action('quit')
endfunction
function! s:vimfiler_settings()
nnoremap <buffer><expr><silent> s vimfiler#do_switch_action('split')
nnoremap <buffer><expr><silent> v vimfiler#do_switch_action('vsplit')
nmap <buffer> q <Plug>(vimfiler_exit)
endfunction
In the following gif I show vimfiler's behaviour (called via the ,fe
mapping):
i) press ,fe
and open the a.txt
file with <CR>
.
ii) press ,fe
again and open b.txt
with v
mapping
iii) press ,fe
again and open c.txt
with <CR>
iv) press ,fe
and open b.txt
with s
I want to achieve the same behaviour with defx however i find the following problems/differences:
i) press ,xfe
and open the a.txt
file with <CR>
-> the defx buffer doesn't close (if I use open
instead of drop
the buffer does close but the file is opened in the defx window (that it's only 40 characters wide))
ii) go back to the defx buffer with <C-W>h
and open b.txt
with v
mapping -> instead of opening to the right (as per the splitright
setting) the b.txt
file is opened to the left
iii) go back to the defx buffer with <C-W>h
and and open c.txt
with <CR>
-> this is correctly opened in the corresponding buffer (where the b.txt
file was)
iv) close the defx buffer with q
, move to the right to the a.txt
file with <C-W>l
, press ,fe
and open c.txt
with s
-> it's not opened below the a.txt
buffer (which is the buffer that called defx) but rather on the same defx buffer window
I think vimfiler has the proper predictable behaviour and defx should follow it.
Problems summary
I'm getting an error when trying to open the Defx buffer.
[defx] Vim(call):E117: Unknown function: _defx_init
[defx] function defx#util#call_defx[2]..defx#start[1]..defx#initialize[1]..defx#init#_initialize[1]..defx#init#_channel, line 11
[defx] defx failed to load. Try the :UpdateRemotePlugins command and restart Neovim. See also :CheckHealth.
Error detected while processing function defx#util#call_defx[2]..defx#start:
line 8:
E117: Unknown function: _defx_start
E15: Invalid expression: _defx_start(paths, context)
Executing :UpdateRemotePlugins
returns this:
Encountered SyntaxError loading plugin at /home/dimas/.cache/dein/.cache/init.vim/.dein/rplugin/python3/defx: invalid syntax (view.py, line 21)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/neovim/plugin/host.py", line 130, in _load
module = imp.load_module(name, file, pathname, descr)
File "/usr/lib/python3.5/imp.py", line 244, in load_module
return load_package(name, filename)
File "/usr/lib/python3.5/imp.py", line 216, in load_package
return _load(spec)
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "/home/dimas/.cache/dein/.cache/init.vim/.dein/rplugin/python3/defx/view.py", line 21
self._vim: Nvim = vim
^
SyntaxError: invalid syntax
remote/host: python3 host registered plugins ['denite', 'deoplete']
remote/host: generated rplugin manifest: /home/dimas/.local/share/nvim/rplugin.vim
Expected
Expected the buffer to open.
Environment Information
-
defx version(SHA1): 52b8b18
-
OS: Ubuntu 18.04
-
neovim/Vim version: v0.3.2-69-ga225374
-
:checkhealth
or :CheckHealth
result(neovim only):
1 health#deoplete#check
2 ========================================================================
3 ## deoplete.nvim
4 - OK: has("nvim") was successful
5 - OK: exists("v:t_list") was successful
6 - OK: has("timers") was successful
7 - OK: has("python3") was successful
8 - INFO: If you're still having problems, try the following commands:
9 $ export NVIM_PYTHON_LOG_FILE=/tmp/log
10 $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
11 $ nvim
12 $ cat /tmp/log_{PID}
13 and then create an issue on github
14
15 health#nvim#check
16 ========================================================================
17 ## Configuration
18 - OK: no issues found
19
20 ## Performance
21 - OK: Build type: RelWithDebInfo
22
23 ## Remote Plugins
24 - WARNING: ".dein" is not registered.
25 - WARNING: Out of date
26 - ADVICE:
27 - Run `:UpdateRemotePlugins`
28
29 ## terminal
30 - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
31 - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
32 - INFO: $VTE_VERSION='4205'
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
if &compatible
set nocompatible
endif
set runtimepath+=/home/dimas/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('/home/dimas/.cache/dein')
call dein#begin('/home/dimas/.cache/dein')
call dein#add('/home/dimas/.cache/dein/repos/github.com/Shougo/dein.vim')
call dein#add('Shougo/denite.nvim')
call dein#add('Shougo/deoplete.nvim')
call dein#add('Shougo/defx.nvim')
call dein#end()
call dein#save_state()
endif
filetype plugin indent on
syntax enable
if dein#check_install()
call dein#install()
endif
let mapleader = " "
The reproduce ways from neovim/Vim starting (Required!)
- start neovim
- execute :Defx
Generate a logfile if appropriate
- export NVIM_PYTHON_LOG_FILE=/tmp/log
- export NVIM_PYTHON_LOG_LEVEL=DEBUG
- nvim -u minimal.vimrc
- some works
- cat /tmp/log_{PID}
Screen shot (if possible)
Upload the log file
SpaceVim/SpaceVim#1261
I hope vimfiler provide a option to set the text. we can use a funcref as the value of the func. and call this func with one argv (path). then return the text which will be used as title.
Problems summary
defx-git ใ fork ใใฆใgetcwd() ใใผในใง git status ใๅๅพใใใฎใงใฏใชใใ
defx ใฎ candidate ใฎ root directory ใใ git ใฎ status ใๅๅพใใๅฎ่ฃ
ใ่กใใพใใใ
๏ผใคใพใใdefx ไธใงใใฃใฌใฏใใช็งปๅใใฆใ้ฉๅใซ git status ใๅๆ ใใใใจใใใใจใงใใ๏ผ
https://github.com/kristijanhusak/defx-git/pull/1/files
ใณใฌ่ชไฝใฏใใพใใงใใฆใใใใชใฎใงใใใ
ๅทฎๅใ commit&push ใใใใจใชใฉใซ Column ๅ
ใซไฟๆใใฆใใ git status ใฎ็ตๆใญใฃใใทใฅใ็ ดๆฃใใๆนๆณใใใใใพใใใงใใใ
ใพใใใงใใใฐๅฏพๅฟใใใๆฉ่ฝใจใใฆใNsec ๆฏใซใญใฃใใทใฅใๆดๆฐใใใชใฉใ่ใใใใใฎใใชใจๆใฃใฆใใพใใ
ใใใใฏ defx ใฎ**ใจใใฆใฏใฉใฎใใใซๅฎ็พใในใใงใใใใใ
Expected
- Column ใไฟๆใใใญใฃใใทใฅใ redraw ๆใซ็ ดๆฃใงใใ
- Column ใไธๅฎๆ้ๆฏใซๅ
ๅฎนใใชใใฌใใทใฅใงใใ๏ผ
Environment Information
-
defx version(SHA1):
** N/A
-
OS:
** N/A
-
neovim/Vim version:
** N/A
-
:checkhealth
or :CheckHealth
result(neovim only):
** N/A
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
** N/A
The reproduce ways from neovim/Vim starting (Required!)
** N/A
Generate a logfile if appropriate
** N/A
Screen shot (if possible)
** N/A
Upload the log file
** N/A
It should be implemented after tree support.
How can I show/toggle hidden files from within defx?
Currently my defx mappings look like this:
nnoremap <silent> <Leader>xf :Defx -split=vertical -winwidth=40
\ -columns=git:icons:filename:type:size -show-ignored-files
\ -direction=topleft `expand('%:p:h')` -search=`expand('%:p')`<CR>
On the other hand on vimfiler one can define settings like this:
call vimfiler#custom#profile('default', 'context', {
\ 'direction' : 'topleft',
\ 'split': 1,
\ 'winwidth' : 40,
\ 'force_quit': 1,
\ 'status' : 1,
\ 'columns' : 'devicons:size',
\ 'safe': 0
\ })
I think the second form is cleaner. Are there plans to implement this?
Using the following minimal init.vim
file:
set nocompatible
let $DOTVIM = expand('$HOME/.config/nvim')
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/defx.nvim
set splitright
set splitbelow
call defx#custom#option('_', {
\ 'winwidth': 40,
\ 'split': 'vertical',
\ 'direction': 'topleft',
\ })
augroup ps_defx
au!
au FileType defx call s:defx_settings()
augroup END
function! s:defx_settings()
nnoremap <silent><buffer><expr> q defx#do_action('quit')
endfunction
Do:
i) Open nvim and run :vsplit
and put the cursor on the right window (with <C-W>l
)
ii) Run :Defx
and then q
to quit
iii) The cursor is now on the left window when it should be on the right one
When starting defx on unsaved files, the unsaved changes will be discarded. That is unfriendly.
Therefore, it would be better to let users choose.
It will act like this:
- :Defx
- unsaved changes. discard? (y / n / s:save and go):
- :Defx -save-force
- :Defx -no-save-force
Use namedtuple feature for context information instead.
Note: Use typing.NamedTuple
I have often e.g. two windows open, see attachment defx_1.png
Now usually I would like to start/open defx in the same window as the file (here the left python script) and have the cursor at the file position. This worked before my vacation time.
Now, after an update. Defx will start in the existing defx-window in the right and keeps the python file open.
The same effect occurs with more than two windows and even with tabs.
This is the command I use:
map d :Defx -auto-cd expand('%:p:h')
-search=expand('%:p')
but a simple :Defx results in the same behavior.
Do you have an idea?
I think defx.nvim needs screenshot in README.
If you have good screenshots for defx.nvim README, can you add it in this issue?
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
On Windows10, Defx does not show dot files example .gitignore
.
Expected
Defx does not show dot files .gitignore
, .editorconfig
etc.
I want find and edit dot files via defx, example .gitignore
, .stylelintrc.json
or another.
I tried :call defx#do_action('toggle_ignored_files')
.
But change nothing, is it no relation 'toggle_ignored_files' between dot files?
Environment Information
-
defx version(SHA1):
d50b5ad
-
OS:
Windows 10 Pro 1803 OS build 17134.407
-
neovim/Vim version: NeoVim 0.3.1
-
:checkhealth
or :CheckHealth
result(neovim only):
health#defx#check
========================================================================
## defx.nvim
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: RelWithDebInfo
## Remote Plugins
- OK: Up to date
health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: win32yank
## Python 2 provider (optional)
- WARNING: No Python interpreter was found with the neovim module. Using the first available for diagnostics.
- ERROR: Python provider error
- ADVICE:
- provider/pythonx: Could not load Python 2:
python2 not found in search path or not executable.
python2.7 not found in search path or not executable.
python2.6 not found in search path or not executable.
C:\Users\akiya\AppData\Local\Programs\Python\Python37-32\python is Python 3.7 and cannot provide Python 2.
- INFO: Executable: Not found
## Python 3 provider (optional)
- INFO: Using: g:python3_host_prog = "C:\Users\akiya\AppData\Local\Programs\Python\Python37-32\python"
- INFO: Executable: C:\Users\akiya\AppData\Local\Programs\Python\Python37-32\python
- INFO: Python3 version: 3.7.0
- INFO: python-neovim version: 0.2.6
(outdated; from ~\AppData\Local\Programs\Python\Python37-32\lib\site-packages\neovim)
- WARNING: Latest python-neovim is NOT installed: 0.3.1
## Ruby provider (optional)
- WARNING: `ruby` and `gem` must be in $PATH.
- ADVICE:
- Install Ruby and verify that `ruby` and `gem` commands work.
## Node.js provider (optional)
- ERROR: Command timed out: node -v
- INFO: Node.js:
- WARNING: Missing "neovim" npm (or yarn) package.
- ADVICE:
- Run in shell: npm install -g neovim
- Run in shell (if you use yarn): yarn global add neovim
Screen shot (if possible)
Upload the log file
In this issue i reported a problem where i couldn't open a file that is part of wildignore #24.
You fixed it by setting wildignore to empty list temporarily, and returning it back to the old value.
That fixed the issue, but caused another problems.
For example, i'm using vim-gutentags to auto generate tags file. It also respects the wildignore when generating tags.
I noticed that when i open a project file from defx,gutentags generates a lot of bad tags that should be ignored. When i run command to do it again, everything works fine.
I figured out that gutentags generates tags on bufread, and at that moment wildignore is empty because of defx.
Problems summary
When I execute Denite
command, cause ModuleNotFoundError
in python.
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/source/defx/history.py", line 7, in <module>
[denite] from neovim import Nvim
[denite] ModuleNotFoundError: No module named 'neovim'
Expected
Please fix this bug.
I suppressed this error by rename module name neovim
to pynvim
.
Environment Information
-
defx version(SHA1): f491b9e
-
OS: arch(2018/12/3)
-
neovim/Vim version: NVIM v0.3.2-896-ge53ae88e7
-
:checkhealth
or :CheckHealth
result(neovim only):
health#defx#check
========================================================================
## defx.nvim
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: RelWithDebInfo
## Remote Plugins
- OK: Up to date
## terminal
- INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
- INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
- INFO: $COLORTERM='truecolor'
health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: xsel
## Python 2 provider (optional)
- INFO: `g:python_host_prog` is not set. Searching for python2 in the environment.
- INFO: Executable: /usr/bin/python2
- INFO: Python2 version: 2.7.15
- INFO: python2-neovim version: 0.3.1
- OK: Latest python2-neovim is installed: 0.3.1
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Executable: /usr/bin/python3
- INFO: Python3 version: 3.7.1
- INFO: python3-neovim version: 0.3.1
- OK: Latest python3-neovim is installed: 0.3.1
## Ruby provider (optional)
- INFO: Ruby: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
- INFO: Host: /home/uplus/.gem/ruby/2.5.0/bin/neovim-ruby-host
- OK: Latest "neovim" gem is installed: 0.7.1
## Node.js provider (optional)
- INFO: Node.js: v11.3.0
- INFO: Neovim node.js host: /home/uplus/.npm-packages/lib/node_modules/neovim/bin/cli.js
- OK: Latest "neovim" npm/yarn package is installed: 4.2.1
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
" Your minimal init.vim/vimrc
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/denite.nvim,~/.cache/dein/repos/github.com/Shougo/defx.nvim
and install pynvim
The reproduce ways from neovim/Vim starting (Required!)
- start neovim
- execute
:Denite base
Log
[denite] Traceback (most recent call last):
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/__init__.py", line 38, in start
[denite] return ui.start(args[0], args[1])
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 70, in start
[denite] self._start(context['sources_queue'][0], context)
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 120, in _start
[denite] self.init_denite()
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 635, in init_denite
[denite] self._denite.start(self._context)
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 39, in start
[denite] self._load_sources(context)
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 321, in _load_sources
[denite] for Source, path, _ in rplugins:
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/util.py", line 253, in import_rplugins
[denite] spec.loader.exec_module(module)
[denite] File "<frozen importlib._bootstrap_external>", line 728, in exec_module
[denite] File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[denite] File "/home/uplus/.cache/dein/.cache/init.vim/.dein/rplugin/python3/denite/source/defx/history.py", line 7, in <module>
[denite] from neovim import Nvim
[denite] ModuleNotFoundError: No module named 'neovim'
[denite] Please execute :messages command.
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Path completion doesn't work when argument has "~", ".." and so on on both Windows and Ubuntu.
Expected
Path completion should work even argument has "~", ".."
One of the solution idea I wrote here. #29
Environment Information
-
defx version(SHA1):
c83f524
-
OS:
Windows 10
Ubuntu 16.04
-
neovim/Vim version:
Vim 8.1.467
-
:checkhealth
or :CheckHealth
result(neovim only):
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
call plug#begin('~/.vim/plugged')
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'Shougo/defx.nvim'
call plug#end()
The reproduce ways from neovim/Vim starting (Required!)
:Defx ~/<Press-Tab>
With vimfiler
I can use the following to open ranger file manager at the current directory:
if executable('ranger')
nmap <buffer>ge <Plug>(vimfiler_cd_vim_current_dir)
\ <C-u>:call <SID>TmuxSplitCmd('ranger')<CR>
endif
where the TmuxSplitCmd
function is:
function! s:TmuxSplitCmd(cmd)
if empty('$TMUX')
return
endif
silent execute '!tmux split-window -p 30 -c '. getcwd() . ' ' . a:cmd
endfunction
I'm trying to do the same with defx:
if s:is_linux && executable('ranger')
nmap <silent><buffer><expr>ge defx#do_action('change_vim_cwd',
\ "call <SID>TmuxSplitCmd('ranger')")
endif
but I get the following error
Error detected while processing function defx#_do_action[6]..defx#util#rpcrequest[15].._defx_do_action[1]..remote#define#request:
line 2:
error caught in request handler '/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx:function:_defx_do_action [['change_vim_cwd', ["call <SNR>1_TmuxSplitCmd('ranger')"], {
'columns': 'mark:filename:type', 'auto_cd': False, 'prev_bufnr': 7, 'resume': False, 'listed': False, 'new': False, 'fnamewidth': 100, 'direction': '', 'winheight': 0, 'profile': False, 'search': '', 'buffer_name
': 'default', 'winwidth': 0, 'split': 'no', 'cursor': 22, 'toggle': False}]]':
Traceback (most recent call last):
File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx/__init__.py", line 41, in do_action
self._rplugin.do_action(args)
File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx/rplugin.py", line 37, in do_action
view.do_action(args[0], args[1], args[2])
File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx/view.py", line 321, in do_action
ret = action.do_action(self, defx, action_name, context)
File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx/action.py", line 38, in do_action
action.func(view, defx, context)
File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/defx/action.py", line 74, in _change_vim_cwd
view._vim.command(f'silent {command} {defx._cwd}')
File "/home/pedro/.local/lib/python3.7/site-packages/pynvim/api/nvim.py", line 287, in command
return self.request('nvim_command', string, **kwargs)
File "/home/pedro/.local/lib/python3.7/site-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/home/pedro/.local/lib/python3.7/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
raise self.error_wrapper(err)
pynvim.api.nvim.NvimError: b'Vim(call):E488: Trailing characters'
Error detected while processing function defx#_do_action[6]..defx#util#rpcrequest:
line 15:
E171: Missing :endif
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Defx is slower than nerdtree, is this normal?
Expected
I am fed up with nerdtree support for windows.
Then I try defx, I only compared the time to open defx and nerdtree, just to evaluate from subjective feelings.
Environment Information
-
defx version(SHA1): latest
-
OS: win10
-
neovim/Vim version: vim8.1
-
:checkhealth
or :CheckHealth
result(neovim only):
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
The reproduce ways from neovim/Vim starting (Required!)
Generate a logfile if appropriate
Screen shot (if possible)
Upload the log file
Hello! I love your defx.nvim!
I'm happy if you add the functions of modifing file names
.
(before)
- /Users/callmekohei/tmp/Foo/
2018-08-15-foo
2018-08-15-bar.txt
2018-08-15-baz.txt
(after)
- /Users/callmekohei/tmp/Foo/
foo
bar.txt
baz.txt
Thanks :-)
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
First i use :Defx
open the defx. The syntax highlight not work. But when I :Defx
again it work.
Every time i want syntax highlight, I need to command twice.
I found that when vim-precious
plugin enable. Defx syntax highligh will not work (See minimal vimrc file).
Environment Information
-
defx version(SHA1): lastest
-
OS: macos
-
neovim/Vim version: NVIM v0.3.1
-
:checkhealth
or :CheckHealth
result(neovim only):
## defx.nvim
health#defx#check
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
et $nvimrc=fnamemodify(expand('<sfile>'), ':h')
let s:dein_dir = expand($nvimrc.'/dein')
if &runtimepath !~# '/dein.vim'
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
" Auto Download
if !isdirectory(s:dein_repo_dir)
execute '!git clone https://github.com/Shougo/dein.vim ' . s:dein_repo_dir
endif
execute 'set runtimepath^=' . s:dein_repo_dir
endif
let g:dein#install_max_processes = 16
let g:dein#install_message_type = 'none'
if !dein#load_state(s:dein_dir)
finish
endif
call dein#begin(s:dein_dir, expand('<sfile>'))
if !has('nvim')
call dein#add('roxma/nvim-yarp')
call dein#add('roxma/vim-hug-neovim-rpc')
endif
call dein#add('Shougo/defx.nvim')
call dein#add('osyo-manga/vim-precious')
call dein#end()
call dein#save_state()
if has('vim_starting') && dein#check_install()
call dein#install()
endif
The reproduce ways from neovim/Vim starting (Required!)
Use above vimrc setting then:Defx
twice
Screen shot (if possible)
:Defx
no syntax highlight
Upload the log file
https://gist.githubusercontent.com/amikai/5fbdf649a64c3e2e8441b039b4d254dc/raw/ac6417845cfa7d18bd4488bfbc02d680ecd200ec/gistfile1.txt
Problems summary
Defx search stopped working from commit 8b98842. Commits before work.
Environment Information
NVIM v0.3.2-dev
Build type: RelWithDebInfo
Lua 5.1
:checkhealth
or :CheckHealth
result(neovim only):
health#defx#check
========================================================================
## defx.nvim
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
set runtimepath+=~/path/to/defx.nvim/
nnoremap <Leader>n :call DefxFindFile()<CR>
function! DefxFindFile() abort
return execute(printf('Defx %s -search=%s', expand('%:p:h'), expand('%:p')))
endfunction
- Open file
- Press Leader n
It opens the right folder, but doesn't find the file.
With this PR #14 i added an option to create a new file in nested directory that does not exist, and it would create all parent directories.
new filename: inside/nested/folder/file.txt
When code was switched to use the Path from path lib, logic was changed, and now only one level deep is allowed:
So this works:
new filename: inside/file.txt
But this doesn't:
new filename: inside/nested/file.txt
Hi, @Shougo.
Is there a better way to automatically close the defx buffer whenever I complete an defx#do_action('open')
? I'm doing this way:
autocmd BufReadPre,FileReadPre * call s:DelDefxBuffer()
function! s:DelDefxBuffer()
if bufexists("[defx]")
exe 'bdelete \[defx\]'
endif
endfunction
Thanks!
I think his option is quite necessary.
For example, I want to open defx buffer vertically, and set winwidth
option to 35
, and set columns
to mark:icons:filename:git:size
, then I cannot see git:size
without fnamewidth
option, because the file
column is too wide.
As commented in #1 (comment)
Provide custom actions which will pass the path of the selected file/directory to a user provided function.
This could be implemented with a new custom
action no matter if the selected item is a file or directory (User will need to check if the received path correspond to a file or directory):
defx#do_action('custom', 's:myfunction')
Or by providing specific actions for files and directories:
defx#do_action('custom_file', 's:myfunction_for_files')
defx#do_action('custom_directory', 's:myfunction_for_directories')
Thanks!
Hi,
I am not in the position to ask for much, but I thought, I could add some wishes for the features based on my dired experience:
- Live-narrowing of search results (https://github.com/Fuco1/dired-hacks/blob/master/dired-narrow.el)
- Extension based highlight (https://github.com/Fuco1/dired-hacks#dired-rainbow)
- option to toggle the permissions/owner/groups
- option to have several independent buffers with the file manager in different directories open; similar like a dual pane file manager (I am not sure, if this was meant by double filer feature)
- speed; at the moment it seems, that vimfiler is compared to ranger, vifm, dired much slower to load a new directory when the directory has a lot (just checked for a cases with around 1000 files) of files
Thank you!
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Files and folders that are part of set wildignore
cannot be opened.
Expected
Expected to be able to open it even if it's ignored.
Environment Information
-
defx version(SHA1): latest
-
OS: Linux mint 19
-
neovim/Vim version: NVIM v0.3.2-dev
-
:checkhealth
or :CheckHealth
result(neovim only):
health#defx#check
========================================================================
## defx.nvim
- OK: has("python3") was successful
- OK: Python 3.6.1+ was successful
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
" Your minimal init.vim/vimrc
set runtimepath+=~/path/to/defx.nvim/
autocmd FileType defx call s:defx_my_settings()
function! s:defx_my_settings() abort
nnoremap <buffer><expr> <CR> defx#do_action('open')
endfunction
"It happened for me with node_modules, can be anything.
set wildignore=*my_ignored_folder/**
The reproduce ways from neovim/Vim starting (Required!)
- run
:!mkdir my_ignored_folder && echo "testing" > my_ignored_folder/test.txt
- run
:Defx
- navigate to folder
my_ignored_folder
- Try to open
test.txt
with Enter
With min vimrc provided i don't get any errors, but in my full setup i get this:
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Having to make multiple files and directories in a defx buffer requires some memorization of different mappings. Would you be interested in a PR that combines the two functions as one? This is similar to what NERDTree does
Some code to show what it would look like
def _new_node(view: View, defx: Defx, context: Context) -> None:
"""
Create a new file or directory.
"""
nodename = cwd_input(view._vim, defx._cwd,'Please input a new file/dir name. Dirs end with a "/": ', '', '')
if not filename:
# Input canceled
return
if filename.exists():
error(view._vim, '{filename} already exists')
return
# filename is directory
if filename[-1] is '/':
filename.mkdir(parents=True)
# filename is a file
else:
if not filename.parent.exists():
filename.parent.mkdir(parents=True)
Path(filename).touch()
view.redraw(True)
view.search_file(str(filename), defx._index)
Problems summary
Path completion doesn't work on Windows because
s:expand() returns paths with "/" as separator where glob() returns paths with "\"
|
let arglead = s:expand(a:arglead) |
|
" Path names completion. |
|
let files = filter(glob(a:arglead . '*', v:true, v:true), |
|
\ 'stridx(tolower(v:val), tolower(arglead)) == 0') |
Expected
Path completion on Windows
Recommend Projects
-
-
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. ๐๐๐
-
Recommend Topics
-
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.
-
Recommend Org
-
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.
-