Gedit file browser shortcuts? - linux

What shortcuts do you use for file navigation in Gedit? Does anyone use the file browser?
I thought that these shortcuts would exist, but I can't find anything about them:
switch focus to/from the file browser.
disclose folder contents. (Most applications use up/down arrows for moving up and down, and the right/left arrows to open/disclose the folders.)
Do these exist?
Thanks,
Loren

I'm going to assume at this point that no one knows of these. (The only semi-useful shortcut I have found is F9, which simply shows/hides the file browser.)
Even the official shortcut list doesn't show anything regarding these two features:
http://live.gnome.org/Gedit/KeyboardShortcuts
For now, I'll submit this as a bug. Please let me know if this changes, so I can inform the dev team.
Loren

The shortcuts for the embedded file browser are pretty much the same as the file manager ones:
Enter - open directory
Backspace - go back
Alt+Up - go up one level
Up and Down arrows - navigate directory contents
As to how to switch focus to/from the file browser, I have added an answer here.

Related

Dreamweaver-like "related files" viewer and editor for Sublime Text 3

Not sure if this has been answered already as I could not find anything.
I was using Dreamweaver for the longest time but switched almost immediately to Sublime last year.
The problem is I have gotten very used to viewing and editing the related CSS & JS files linked or referenced from the parent HTML file in DW-CS6.
Is there any functionality or plugin for Sublime that enables this accessibility? - See screenshot for what I'm specifically talking about.
Thanks in advance
Off the top of my head, no, but I could be wrong. Instead, use "Go to anything" - ctrl+P.
The thought is if you are building something, you have set up a project, which adds all the files that are a part of the thing you are building. Alternatively, you can drag & drop said folder from your computer into ST3 - this is like a de facto project.
Once done, instead of clicking style.css and searching for myCoolClass, you can just press ctrl+P and start typing. without knowing your file, I am betting you'd only have to type myc or myco before it is found. You can just review the part of the file - or pressing enter will open style.css. Now you don't need to remember that myCoolClass is in style.css vs style-desktop.css.

"Registering" GVim in Windows XP

This is probably bordering off-topic-ness here, but not a lot of people on SuperUser use GVim, as opposed to here, so I'm leaving it here.
The problem is simple - I'm using GVim 7.3. from vim.org, downloaded it in the form of archived binaries (the two archive files) like always and replaced the older version. However, I can't get Windows to recognize it and to associate a file extension to it.
From windows explorer go to, let's say, .py file, Open with ... / Browse / gvim.exe in its directory and ... nothing. Like it never happened.
Does anyone have any idea what could be causing this behaviour? It's mighty annoying to have to open every file from within Vim manually.
I think the default installer ("self-installing executable") from vim.org lets you register shell associations; this means you get an entry "open with vim" in every context menu from the explorer. Did you not use this file?
I'm looking at this page and I'm thinking about this download.
This doesn't answer your question, but it's a different way to edit with gvim from the context menu.
Create a .reg file with the contents below (adjusting your path to gvim.exe) and execute it. Then whenever you right-click on a file in explorer you will have an "Open with GVIM" option.
REGEDIT4
[HKEY_CLASSES_ROOT\Unknown\shell]
#="Open with GVIM"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell]
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with &GVim]
#="Open with GVIM"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with &GVim\command]
#="C:\\Vim\\gvim.exe \"%1\""
I gave up trying all kinds of tricks through the registry, but this solution works for me just fine. I might add, I'm having the same issue on Windows 7. Since Windows seems to be able to do the association with vim.exe just fine, and this is apparently tied to the file name, I moved vim.exe off as say vim.ex$ and made a copy of gvim.exe to vim.exe. Cheap and easy way around this goofy problem, and I can't say I ever use vim.exe on purpose.

File Manager tab in vim

I'm very close to figuring this out, but can't seem to find the missing piece.
I have a pretty good vim set up for development. When doing MVC projects, I need multiple tabs open, and I've gotten pretty good at shifting between them and rearranging quickly.
I can even open a vertical tab with an interactive directory listing of my files.
What I really want and can't figure out:
To be able to have this vertical tab persistent, that is, in the "foreground" of all tabs, and allow me open a file into a new tab. (Basically, I want vim to have a sidepane that is a file manager and when i press enter on a selected file in the directory, it will open a new tab, but the "file manager/directory tab" will stay open, and in front.
To set the persistent "file manager/directory tab" to be a specific width - ie :vsplit 32(pixels?)
Does that make sense? Can anyone point me to the right part of the help section for this?
Thanks, Kevin
Are you using NERDTree? If not, it might be the answer to your prayers.
You can set the width of the NERDTree window by putting this in your .vimrc:
let g:NERDTreeWinSize=32
For the benefit of anyone passing by, you should take a look at project. It took me a bit to figure it out, but you basically get a file browser on the lefthand side. It's up to you to manage the file list though, so you can apply filters, link to source/api docs, and omit what's not important. Of course it will automatically fill in the list, if you like. Very neat. It's a help page you have to sit down and read, but I like it.
You should also look at snipMate and surround if you love efficiency. I've been using vim for ten years and this is all new to me! Life changing! Now I have to quite fiddling with the interface and get some work done.

Can't save php.ini

I have PHP for FastCGI installed on Windows 7 through the Web Platform Installer. I need to edit php.ini to enable logging, but I'm not able to overwrite the existing file, apparently because something has it open and/or locked.
Stopping the server in IIS Manager doesn't help; stopping the Windows Process Activation Service and the World Wide Web Publishing Service doesn't help. phpinfo() confirms that I'm working with the correct file (C:\Program Files (x86)\PHP\php.ini). It's not marked as read only and I do have permissions for it. I'm out of ideas.
I had this problem and managed to work around it. You need to be running the editor (notepad or whatever) as an admin.
In Window Vista / Window 7, right click and choose "Run as Administrator".
Then open php.ini and edit it...
Another option is to copy the text of the file into a new file in a different location, make your changes, save the file as 'php.ini'. Then copy the new file across overwriting the old one. Explorer may handle the permissions differently.
I've had a similar problem, and I was working in windows 10 which doesn't use "run as administrator"
So this is what I did:
right click the problem file and go to properties
go to tab security
click edit, which should have a shield
select in names of groups: Users(computer specifics\Users)
in the square under it you can allow editing of the file
This causes it to allow you to edit the file for users and not run into the problem anymore. This also removes the problem in the future for this file so you can always edit it again by just opening the file in text editor.
Please note I am Dutch and that certain names are translated incorrectly.
You could use the Find Handle feature of Process Explorer (direct EXE download link), from Sysinternals (a part of Microsoft now), to find out what exactly is locking the file.
I'm sorry I can't help with your exact question, but hope that helps!
In Windows 7, right click Notepad and choose "Run as Administrator". Make sure you do not use Notepad++ as your editor. It accesses this file and therefore tells you there's is an error.
The default notepad will work fine with these instructions.
Depending on what are you trying to write to the file, you can write to an '.htaccess' file on the root of the site instead. I can provide a more specific example if you would like.
You can also use Unlocker to figure this out. A pain, but the utility is really handy anyway so it won't hurt to have it around.
1) Open CMD with administrator mostly like this.
2) Then go to "C:\Program Files\php-8.1.7" like this.
3) then paste "cd C:\Program Files\php-8.1.7" and press Enter and type
php.ini like this.
4) It will automatically open the file in a text editor or suggest to
open any editor like notepad , notepad++,vs code etc.
5) edit as you wish and save it like (ctrl + s) .Here I adding MongoDB
extension like this .And that's it.
By the way the question was asked 12 years ago but we still facing the problem
Try this:
Stop the webserver
Change the file
Start the webserver
If that doesn't work, then you are probably changing the wrong file. It's possible that the original file is elsewhere and when the server starts it copies it to C:\Program Files (x86)\PHP\php.ini. phpinfo() might be pointing to the file that is overwritten every time...

VIM VTreeExplorer plugin (IDE style browsing for VIM)

I've looked at a number of the IDE style file explorer / management plugins for VIM. The most popular one seems to be Project, but I've never got on well with it. Specifically, having to always create a .project file for the files you want to browse, and that changes to that file hierarchy outside of VIM are not picked up.
I stumbled across the VTreeExplorer plugin and I really like the way it works. I'm trying to work out how I can make it work in a more IDE style way, for instance, to always open vertically down the full length of my window, and once I've opened a file from it, it automatically hides the VTreeExplorer buffer again? Also, ideally it wouldn't show up when I use :bn or a buffer explorer to tab through each file buffer.
Any recommendations would be appreciated. Thanks!
What about NERDTree? It is really good, one of the best file tree plugin for vim available.

Resources