Autocomplete nvim recent files in command line
Installation
Install the python package
pip install nfasd
Add the following line in your ~/.bashrc
eval "$(register-python-argcomplete-menu nfasd)"
# use TAB to cycle through all possible matches
# optional but highly recommended
[[ $- = *i* ]] && bind TAB:menu-complete
Alternatively, if you use zsh, add the following to ~/.zshrc
eval "$(register-python-argcomplete-menu nfasd)"
# stop shell from beeping for every complete
# optional but highly recommended
setopt NO_LIST_BEEP
For fish shell, you need to install
pip install argcomplete
register-python-argcomplete --shell fish my-favourite-script.py > ~/.config/fish/my-favourite-script.py.fish
Configuration
Add the following to ~/.bashrc or ~/.zshrc
alias n='nfasd -e nvim'
alias ny='nfasd -e nyaovim'
Then you can press n myPro<tab>
to get n ~/myProject
-e specifies which executable to open the file
If you want to exclude certain file patterns, use the –exclude option, e.g.
alias n=`nfasd -e nvim --exclude tmp`
Changelog
1.0 for python3
0.19 for python2
Tips
To increase the number of recent files to 1000, add the following line to your ~/.config/nvim/init.vim
set shada=!,'1000,<50,s10,h
Special Thanks
fasd : the awesome command line tool
Release files for nfasd 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nfasd-2.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nfasd-2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / nfasd-2.0.tar.gz
| Download URL | nfasd-2.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2638e0392f92f8c498df9e8c400dbe20b2087c671e33c677d23d6216435508b
|
|
BLAKE2b-256 checksum How to use checksums |
c8cbe23e6f2f375f5e0956e6f407302da28eff40d78abd11ad3375c40ee17d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / nfasd-2.0-py3-none-any.whl
| Download URL | nfasd-2.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0cec51c27db07bfc1309ce15817c19386e066b06d4169b016cbc9e1b8652a8e9
|
|
BLAKE2b-256 checksum How to use checksums |
d42595587d8a0899c1b1c7bee13afcbb4d41308650bac6fe3a444798653676ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|