gvim to show file path in all the tabs (even current one) - vim

By default shows gvim in my tabs: the names of files. They're however shown in a way like this:
if is in the same as the currently opened tab/buffer => no path shown (only file name)
otherwise abbreviated path and file name are shown
however when I change the tab this causes tab names to change and brings me quite some confusion.
Any chance to have it constantly going for: abbreviated path and file name are shown?
I've seen following:
:set guitablabel=%!expand(\"\%:t\")
however it goes the other way, so shows only file names on all the tabs (no path at all).
in http://objectmix.com/editors/148913-display-gvim-tabs.html

How about this:
:set guitablabel=%!pathshorten(expand(\"\%:p\"))
This uses the :p filename-modifier to get the full absolute path, and then shortens the path via pathshorten() in the way it is usually done in the tab labels.

Related

set tab-stop = 2 in vim permanently for a file

How to set the tab size as 2 for a file permanently in vim as whenever I open a file in other editors like nano or upload the file in github then my indentations are all incorrent whenever I try to resize the tab to 2 for an existing file which has all incorrect indentations. The tab-stop=2 does not permanently resizes the tab and I see all incorrect indentation when I open the same file in nano or view it in github.
Tabs don't have an inherent size so it is up to each program to decide how to display them and there is simply no way to guarantee that a tab will always look the same everywhere.
This is precisely the main issue people have with tabs: you can tell $SOME_TOOL and $SOME_OTHER_TOOL that a tab takes two spaces but that setting can't possibly be carried over to every tool.
Modelines are editor-specific (and they are too intrusive anyway) and Editorconfig is not universally supported so there is really no universal solution beyond using spaces for indentation.

In Vim, show path of file from where the code autocompletion is coming from

In Vim, when doing auto completion with ^n, I see autocompletion suggestions from the current file as well as different files all mixed together.
I would like to get a behavior similar to what is shown on the below picture, i.e. display the path of the file containing the suggestion if the suggestion is coming from file other than the current one.

Unable to search Sublime editor folder files

I am new to Sublime, used to using Dreamweaver as my web editor. I have my project folder open in the Sublime Text 3 and I need to search all the files for a particular link https://test.com. From what I found on the web I need to hit Shift+Ctrl+F, enter my search string and then in Where: type the folder path I want to search. I have done that but the result set is empty even though I know the string I am searching for is there multiple times.
I tried entering the full path: W:\Web\App1 (where App1 is the folder I have opened as the project folder) as well as App1 but nothing gets returned. What am I doing wrong here?
Similar to Ctrl+Shift+F, you can right-click on the folder you want to search in, then choose 'Find in Folder'
In the bottom 'Find' box, make sure to have the 'Find options buttons' (on the left of the image) correctly set.
This is a very powerful option I use very often. Now I've tested in my SublimeText3 to look for an url like the one you provide and it works fine, as usual. With this setup:
Regular Expression: Off, Case Sensitive: Off, Whole Words: Off
...but this options are pretty straightforward and shouldn't affect your basic searches.

GTK file/folder tree view: enable only highlighting/selecting file name

since this is my first question here, I hope I do not distract you ;-)
I have wondered for a long time now wether there was an option in any
GTK setting that allows me (p.ex. in Nautilus) to select only the file's
or folder's name in an expanded tree view, NOT like this:
https://www.dropbox.com/s/fkeit8nk6ezhjnv/BadNautilus.png?dl=0
But more like this:
https://www.dropbox.com/s/52b9iv2lz0zvahl/GoodSystem7.png?dl=0
In the top picture you see that I wanted to get the context menu of
my home folder while I had the "Downloads" folder expanded, p.ex.
for opening a terminal.
If a (right-)click in the middle of nowhere would be taken as being directed at the current view's top level folder (in this example, my home folder), opening a terminal wouldn't be that of a problem.
Another example: Suppose I wanted to add a new file by selecting right click->New document->... (any template here). This is not possible in a folder
where I have to scroll down because it has so much content in it.
So summing it up:
There are context menu actions that "belong" to the empty screen space in a folder view below the listed files (at least in Nautilus) that I also want to be able to use in a folder which is so crowded that there is no more empty screen space. I know some, at least System 7 finder and Win (up to XP), file managers which are capable of this. Is it possible to system-wide set
the screen space next to the file name string to be equivalent to the empty screen space below a file listing?
Any ideas?
Best regards,
JohnS

How do I get gvim/vim to open a file in a path with non-ascii characters?

At first I had this path to one of my files in Windows:
C:\mine\NOTES
I renamed it such that the last part of the path i.e 'NOTES' had the U+2588 FULL BLOCK=solid
before and after it. I inserted the character using the key combination ALT+219(alt code) which is an extended ascii drawing character. I did this so that the folder could stand out from the 20 plus folders in the directory. At this point, I'm quite happy that it looks cool and does stand out. However, when the files in the folder using a text editor all hell breaks loose. These are the results when I try to open the file scheme_notes.scm in different editors:
path="C:\mine\&#brevbar NOTES &#brevbar"
(The solid character is rendered as a &#brevbar character instead of a solid block.
GVIM prints:
"path" [New directory]`
"path" E212: Can't open file for writing.
Python(IDLE) opens the file but does not display the contents which the file has and prints the following error when you try to run it(I know it's not a python file, I was testing)
IOError: [Errno 2] No such file or directory: 'C:\\mine\\\xa6 NOTES \xa6\\python_notes.py'
(The \xa6 is a &#brevbar character)
Pspad does not allow you to edit the file:
File has set attributes: Hidden ReadOnly System
Save Changes Made to File?`
Scite displays a dialog saying:
Cannot save under this name. Save under different name?
If you click yes, the dialog keeps popping up repeatedly. I had to kill the program using
powershell after there were 15 plus dialogs on the window.(and it hadn't stopped)
Jedit prints:
The following I/O operation could not be completed:
Cannot save: "path" (The system cannot find the path specified)
Netbeans:
Failed to set current directory to "path" The system cannot find the file
specified.
I want Vim to be able to open the file without resorting to renaming the folder. Does vim have a setting for opening paths with unicode characters?
I'm asking this because python was able to change to that directory when I did this:
import os
os.chdir(u"\u2588 NOTES \u2588")
os.listdir('.')`<br> `==> ['scheme_notes.scm','python_struff.py']

Resources