Comments (15)
The vim support was added after v2.1 release. Please wait for v2.2.
from nnn.vim.
@wookayin hmm, seems like it.
cc @jarun
I was using recent master version of nnn. But installing the one from homebrew doesn't have the -p
option.
from nnn.vim.
@jarun I wonder why it's a screenflash rather than logging an error in vim. Is passing illegal options/params in nnn exits non-zero code?
from nnn.vim.
Is passing illegal options/params in nnn exits non-zero code?
Of course. Any CLI program is supposed to do this. It is vim plugin's responsibility to deal with any possible errors.
from nnn.vim.
~/nnn.vim master* 13s
❯ nnn -p
nnn: illegal option -- p
usage: nnn [-b key] [-c N] [-e] [-i] [-l]
[-S] [-v] [-h] [PATH]
The missing terminal file manager for X.
positional args:
PATH start dir [default: current dir]
optional args:
-b key bookmark key to open
-c N dir color, disables if N>7
-e use exiftool instead of mediainfo
-i start in navigate-as-you-type mode
-l start in light mode
-S start in disk usage analyser mode
-v show program version
-h show this help
Version: 2.1
License: BSD 2-Clause
Webpage: https://github.com/jarun/nnn
~/nnn.vim master*
❯ echo $?
0
@wookayin I think nnn passes a 0, so the plugin assume it's a successful run, hence the screen flash.
cc @jarun since I think it's an nnn issue.
from nnn.vim.
Fixed at jarun/nnn@8cba83f.
from nnn.vim.
I see, I had checked nnn wrong -- it was not giving an non-zero exit code :) Thanks for the help!
BTW why homebrew nnn doesn't have the -p
option?
from nnn.vim.
@mcchrish would it be possible to add me as a collaborator to the project?
from nnn.vim.
I wish there were some option that allows nnn to print the path (to stdout) upon keypress of Enter rather than directly opening it. I thought -p
is the right guy for this. In such cases, the plugin integration can go very smooth. Actually it goes with the Unix philosophy.
If it is not the case, one might think of having a keymap overriding Enter to make the nnn prints the selected files.
from nnn.vim.
@jarun just sent an invite.
from nnn.vim.
@wookayin I don't want to change the default behaviour of nnn
and add a hook. I have explained this before.
nnn
has been extended to pick files without hurting any existing functionality- The
Enter
key opens a file or directory innnn
. I would like to keep the experience same for users ofnnn
. - There is a clear way of selecting files in
nnn
and users should follow that - The
Enter
key does not help in case of multiple selection
from nnn.vim.
Guys, I reconsidered the request and found a way to meet the ends. Pressing Enter or ^M will now pick the file and pressing right/l will open it (as in nnn
).
from nnn.vim.
I believe we can close this defect as @wookayin's problem is resolved.
from nnn.vim.
@jarun was hoping to wait for the release of 2.2 in homebrew to close. But anyways I've made note of it in the read me already.
from nnn.vim.
@jarun @mcchrish I appreciate you reconsidering the request and it works amazingly well! Thanks :)
from nnn.vim.
Related Issues (20)
- It takes forever to open, is it normal? HOT 10
- Action setting not working on vim 8.1 HOT 4
- Not saving context state after opening a file HOT 4
- Typo in README HOT 1
- nnn changes the vim PWD to the directory which it quitted HOT 8
- Problem open file with l HOT 1
- `:NnnExplorer` bugs and additional features HOT 33
- Error when using fzopen after changing directory HOT 14
- Explorer window does not close properly when multi tabs have their own opened explorer window HOT 1
- Picker picks the wrong file if a directory with similar name exists HOT 1
- clipboard does not work HOT 3
- ftplugin sets a global option (`noshowmode`)
- When NnnExplorer is invoked via <Leader> key combination the first 10 entries are already tagged ???? HOT 2
- Unexpected behavior when "NnnExplorer" is invoked via a <leader>key combination. HOT 3
- Error when mapping action to <backspace> HOT 3
- Error when exiting nnn picker without choosing a file. HOT 3
- Undefined variable: g:nnn#action in ftplugin/nnn.vim
- Unknown function: term_getstatus in ftplugin/nnn.vim HOT 1
- Colors in nnn.vim don't seem to work always HOT 1
- local sessions not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nnn.vim.