Open Niklas81 opened 3 years ago
Does this happen with other editors?
Actually, this seems to happen with CLI programs (mainly), but not happen with GUI programs (mainly) - for example:-
I'd guess that it depends on the existence of a .desktop file.
Have you tried neovim-qt
- "neovim-qt provides a Qt5 GUI interface for neovim"
I prefer using a non-gui. neovim-qt kills my tabline, font scaling etc..
Q: Does this happen with other editors?
A: When opening with another text-editor, the expected behavior is observed.
So no. But I've only tried using featherpad.
I do have a .desktop-file for neovim, but not quite sure if it's used. When I edit it and change terminal, it still opens in the same. Perhaps it requires a reboot. Don't have a desktop file for vi
, ee
or other terminal-based editors.
Still, it seems to me this is an issue with Nemo. If I execute nvim "~/test testfile"
or nvim ~/test\ testfile
from a terminal, it opens it correctly.
Hi @Niklas81,
this seems to be related to this one #2739. The %F Token is used in Actions. There i have the same Problem with white spaces in file and directory names.
Thanks for notifying me!
%f
fails too.
The issue seems related to the Terminal=true
attribute. I edited the desktop entry for my image viewer. With the original Terminal=false
, it works fine, with Terminal=true
, it fails.
[Desktop Entry]
Type=Application
Version=1.0
Name=iii
Exec=imv %f
Icon=multimedia-photo-viewer
Terminal=true
Categories=Graphics;2DGraphics;Viewer;
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap;
Keywords=photo;picture;
Fiddling with some test scripts, it seems that if Terminal=true
, spaces are not escaped properly when passed to the subprocess.
When opening any textfile with Neovim from Nemo, the file is opened as if the filename was provided without escaping the blank spaces. For example, if I open the existing file
~/test testfile
, Neovim opens two new, empty files, namedtest
andtestfile
, in the same manner as it would had I executednvim ~/test testfile
in a terminal emulator. The expected behavior is Nemo to open the file as if I instead would have executednvim "~/test testfile"
ornvim ~/test\ testfile
. When opening with another text-editor, the expected behavior is observed.