Giter Club home page Giter Club logo

Comments (15)

jarun avatar jarun commented on May 29, 2024 1

The vim support was added after v2.1 release. Please wait for v2.2.

from nnn.vim.

mcchrish avatar mcchrish commented on May 29, 2024

@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.

mcchrish avatar mcchrish commented on May 29, 2024

@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.

wookayin avatar wookayin commented on May 29, 2024

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.

mcchrish avatar mcchrish commented on May 29, 2024
~/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.

jarun avatar jarun commented on May 29, 2024

Fixed at jarun/nnn@8cba83f.

from nnn.vim.

wookayin avatar wookayin commented on May 29, 2024

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.

jarun avatar jarun commented on May 29, 2024

@mcchrish would it be possible to add me as a collaborator to the project?

from nnn.vim.

wookayin avatar wookayin commented on May 29, 2024

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.

mcchrish avatar mcchrish commented on May 29, 2024

@jarun just sent an invite.

from nnn.vim.

jarun avatar jarun commented on May 29, 2024

@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 in nnn. I would like to keep the experience same for users of nnn.
  • 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.

jarun avatar jarun commented on May 29, 2024

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.

jarun avatar jarun commented on May 29, 2024

I believe we can close this defect as @wookayin's problem is resolved.

from nnn.vim.

mcchrish avatar mcchrish commented on May 29, 2024

@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.

wookayin avatar wookayin commented on May 29, 2024

@jarun @mcchrish I appreciate you reconsidering the request and it works amazingly well! Thanks :)

from nnn.vim.

Related Issues (20)

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.