GithubHelp home page GithubHelp logo

shougo / defx.nvim Goto Github PK

View Code? Open in Web Editor NEW
1.2K 28.0 84.0 746 KB

:file_folder: The dark powered file explorer implementation for neovim/Vim8

License: MIT License

Makefile 0.25% Python 79.25% Shell 0.10% Vim Script 20.41%
nvim file-manager vim denite neovim

defx.nvim's Introduction

defx.nvim

Note: Active development on defx.nvim has stopped. The only future changes will be bug fixes.

Please see ddu.vim and ddu-ui-filer.

About

Join the chat at https://gitter.im/Shougo/defx.nvim

Please read help for details.

Defx is a dark powered plugin for Neovim/Vim to browse files. It replaces the deprecated vimfiler plugin.

Concept

  • Doesn't depend on denite.nvim

  • Vim8/neovim compatible(nvim-yarp is needed for Vim8)

  • Implemented by Python3

  • No double filer feature

  • Column feature

  • Source feature like denite.nvim

  • Options

  • Highlight is defined by column

  • Few commands (:Defx command only?)

  • Extended rename

  • Mark

  • Windows supporters are needed

  • Maximum features dislike other file managers

Installation

Note: defx requires Neovim 0.4.0+ or Vim8.2+ with Python3.6.1+. See requirements if you aren't sure whether you have this.

For vim-plug

if has('nvim')
  Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/defx.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif

For dein.vim

call dein#add('Shougo/defx.nvim')
if !has('nvim')
  call dein#add('roxma/nvim-yarp')
  call dein#add('roxma/vim-hug-neovim-rpc')
endif

For manual installation(not recommended)

  1. Extract the files and put them in your Neovim or .vim directory (usually $XDG_CONFIG_HOME/nvim/).

Requirements

defx requires Python3.6.1+ and Neovim(0.4.0+) or Vim8.2+ with if_python3. If :echo has("python3") returns 1, then you have python 3 support; otherwise, see below.

Note: The latest Neovim is recommended, because it is faster.

You can enable Python3 interface with pip:

pip3 install --user pynvim

Please install nvim-yarp plugin for Vim8. https://github.com/roxma/nvim-yarp

Please install vim-hug-neovim-rpc plugin for Vim8. https://github.com/roxma/vim-hug-neovim-rpc

Note: Python3 must be enabled before updating remote plugins

If Defx was installed prior to Python support being added to Neovim, :UpdateRemotePlugins should be executed manually.

Configuration Examples

Please see :help defx-examples.

Screenshots

Please see: #18

Multi root feature Defx -split=vertical Defx -new

defx.nvim's People

Contributors

110y avatar amedama41 avatar amikai avatar daanvdk avatar dietrichm avatar dundargoc avatar gitter-badger avatar h-michael avatar hrsh7th avatar jasonkena avatar kezhuw avatar kkat0 avatar kristijanhusak avatar matsui54 avatar notomo avatar roachsinai avatar shougo avatar shun095 avatar swnakamura avatar tex avatar ujihisa avatar unblee avatar voldikss avatar wonderful-panda avatar zachary-russell avatar zgpio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

defx.nvim's Issues

namedtuple support

Use namedtuple feature for context information instead.

Note: Use typing.NamedTuple

Feature: combine new file and new directory into on function

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)

Implement custom actions

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!

Erro when calling :Defx

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!)

  1. start neovim
  2. execute :Defx

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. some works
  5. cat /tmp/log_{PID}

Screen shot (if possible)

Upload the log file

columns option not working

:Defx -columns={makr,filename}
and any other options result in an empty window for me.
I just updated to get the size and time columns...

Defx -search not working

Problems summary

Defx search stopped working from commit 8b98842. Commits before work.

Environment Information

  • defx version(SHA1): latest

  • OS: Linux mint 19

  • neovim/Vim version:

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
  1. Open file
  2. Press Leader n

It opens the right folder, but doesn't find the file.

Creating file with parent directories fails if there is more than one folder

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

open defx in same window as file

I have often e.g. two windows open, see attachment defx_1.png
defx_1

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?

Auto close defx buffer after opening a new file or dir

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!

some features

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!

Add custom profile

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?

The design

  • Not depends on denite.nvim

  • Vim8/neovim compatible(nvim-yarp is needed for Vim8)

  • Implemented by Python3

  • No double filer feature

  • Column feature

  • Source feature

  • Options

  • Highlight is defined by column

  • Few commands (:Defx command only?)

  • Extended rename

  • Mark

  • Windows supporters are needed

  • The original trashbox feature

  • No minimal features

  • Subtree feature like vimfiler

  • No default mappings

  • No global variables

  • No explorer feature(like g:vimfiler_as_default_explorer)

Release date: In 2018 someday

Wrong split and window positions

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
vimfiler

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
defx

I think vimfiler has the proper predictable behaviour and defx should follow it.

How to clear column's cache?

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

Time column formatting

New time column is great, but the format is really strange. Y:M:D H:M. Can we make this configurable, or somehow use system setting (don't think it's possible) ?

When I execute Denite command, cause ModuleNotFoundError in python.

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!)

  1. start neovim
  2. 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.

Defx steals focus from edit buffer in project drawer mode

Problems summary

Files opened from denite grep buffer sometimes open in defx buffer instead of buffer with a file.

Expected

Files opened from denite grep buffer always open in active buffer.

Environment Information

  • defx version(SHA1): f5f577f

  • denite version (SHA1): bfa24860cbca06dc972d96b51a4cf5b1122bb5ee

  • OS: Linux (ArchLinux)

  • neovim/Vim version: neovim 0.3.1

  • :checkhealth or :CheckHealth result(neovim only):

: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!)

  1. 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
  2. Hit <C-p> to open Defx in project drawer mode
  3. Switch to right buffer (<C-w>l)
  4. cd to your directory with files from 0 - :cd /tmp/defx
  5. <C-f>test<CR> to open denite grep using 'test'
  6. <CR> - t4.txt opens in edit buffer - OK
  7. Open next file: <C-w>j<C-g><CR> - t3.txt opens in edit buffer - OK
  8. Open next file: <C-w>j<C-g><CR> - t2.txt opens in Defx buffer - NOT OK

Screen shot (if possible)

image

Upload the log file

https://gist.githubusercontent.com/azhi/55a0af02829a0f508a129cd08ba907d1/raw/6a346ee089d2680004e802b46c58db33a58bdef6/log_py3_rplugin

Drop into current folder

It would be nice to have a way to jump to the current file or folder. I often edit a file and I want to create another in the same folder or just explore the folder where the current file is.

Keep cursor position when deleting a file/directory

When using the following mappings to delete a (or mutiple) file or directory:

nnoremap <silent><buffer><expr> d defx#do_action('remove_trash')
nnoremap <silent><buffer><expr> d defx#do_action('remove')

the cursor jumps to the top of the defx window after deleting the candidate/s. I expect the cursor to keep its position (as in vimfiler).

Consider case when sorting

Create a directory with the following empty files: AAA, bbb, BBB, aaa. Vimfiler will correctly sort these filenames as AAA aaa BBB bbb whereas defx will sort them as AAA BBB aaa bbb. I believe that defx should follow vimfiler's behaviour.

WIP Feature: choose whether to discard when starting defx

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
    • (save anyway)
  • :Defx -no-save-force
    • (discard anyway)

Why remove fnamewidth option?

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 filecolumn is too wide.

Cannot open files that are part of `wildignore`

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!)

  1. run :!mkdir my_ignored_folder && echo "testing" > my_ignored_folder/test.txt
  2. run :Defx
  3. navigate to folder my_ignored_folder
  4. 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:
error

(WIP) modify file names

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 :-)

defx is slower than nerdtree?

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

On Win10 dot files does not show

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)

2018-11-29_15h21_16

Upload the log file

Default key mappings

I am sorry Shougo but I would like to say your default key mappings of choices were horrible for vimfiler. I know you can change it but it's not a great experience for first-time users. Like, who would have thought to press Shift + K to make a new directory? There is no mnemonic and it's not intuitional. So, if you don't mind, can we discuss this before its implementation? They should be easy to remember and well-thought. For example, cf, [c]reate [f]ile or cd, [c]reate [d]irectory something like that. Although this can be more intuitive with dd, cut file or directory under cursor and yy, copy file or directory under cursor.

Path completion doesn't work again on Windows

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

Path completion doesn't work when argument has characters which needs expand()

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>

Errors when using do_action with custom vim function

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

WIP Feature: choose whether to discard when starting defx

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 -force-save
    • (save anyway)
  • :Defx -force
    • (discard anyway)

Go to previous window after quitting

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

Defx screenshots

I think defx.nvim needs screenshot in README.

If you have good screenshots for defx.nvim README, can you add it in this issue?

Adjust content to window width

Consider the following minimal init.nvim:

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
filetype plugin indent on

nnoremap <silent> ,xf :Defx -split=vertical -winwidth=40
            \ -columns=mark:filename:type:size -show-ignored-files
            \ -direction=topleft `expand('%:p:h')` -search=`expand('%:p')`<CR>

Now open nvim and run ,xf. You can see in the GIF that the file size is not shown in the window and you need to scroll to the right to actually see it. On the other hand on vimfiler this works correctly (i.e the contents of window are adjusted to fit in the window width)

peek 2019-01-02 02-09

Command for vertical split not working anymore

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Command for vertical split not working anymore:

:Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type

It's just opening full window.

Expected

Open a sidebar as it worked previously

Environment Information

  • defx version(SHA1): 8cb96ac

  • OS: ArchLinux

  • neovim/Vim version: NeoVim 0.3.2

  • :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/

The reproduce ways from neovim/Vim starting (Required!)

  1. :Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type

Extra

Bad commit: bf78fd8

Temporary clearing wildignore list causes issue with another plugins

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.

How to auto move cursor to second line after open directory

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

I would like to have the cursor moved to the second line in defx buffer instead of the first line when I open a directory with l like the current behaviour

  • Sometimes the cursor is in the second line though but I always want the cursor go to the second line because put cursor at the first line (current opened directory in defx window) seem useless.

What I have tried so far:

nnoremap <silent><buffer><expr> l       defx#do_action('open_directory') <Bar> 'j'
nnoremap <silent><buffer><expr> l       defx#do_action('open_directory') <Bar> execute 'normal j'

but it does not work.

Expected

Be able to move the cursor to the second line after open a directory.

Environment Information

  • defx version(SHA1): latest

  • OS: Mojave

  • neovim/Vim version: neovim 0.3.4

  • :checkhealth or :CheckHealth result(neovim only):

health#defx#check
========================================================================
## defx.nvim
  - OK: has("python3") was successful
  - OK: Python 3.6.1+ was successful

health#coc#check
========================================================================
  - OK: Environment check passed
  - OK: Service started

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release
    LuaJIT

## 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'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: screen-256color

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/usr/local/bin/python2"
  - INFO: Executable: /usr/local/bin/python2
  - INFO: Python version: 2.7.15
  - INFO: pynvim version: 0.3.1
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Python version: 3.7.2
  - INFO: pynvim version: 0.3.1
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
  - INFO: Host: /Users/sand/.rbenv/shims/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.8.0

## Node.js provider (optional)
  - INFO: Node.js: v11.6.0
  - INFO: Neovim node.js host: /Users/sand/.config/yarn/global//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!)

" defx.nvim {{{
nnoremap <silent> <F3> :Defx `expand('%:p:h')` -search=`expand('%:p')`
      \ -columns=git:mark:filename:type
      \ -toggle
      \ -split=vertical
      \ -winwidth=50
      \ -direction=botright<CR>
" }}}

" ftplugin/defx.vim
nnoremap <silent><buffer><expr> l       defx#do_action('open_directory')

The reproduce ways from neovim/Vim starting (Required!)

  1. Press F3
  2. Hit j/k to navigate to a directory
  3. Hit l to open directory
  4. The cursor is at the first line

Syntax highlight not work

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)

GitHub Logo

:Defx no syntax highlight

Upload the log file

https://gist.githubusercontent.com/amikai/5fbdf649a64c3e2e8441b039b4d254dc/raw/ac6417845cfa7d18bd4488bfbc02d680ecd200ec/gistfile1.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.