473,385 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Controlling the cusor in the file browser in Vim

From the command line I enter `vim`.
I am greeted with the Vim version number etc.
Then I type ` :e .`
I'm now in the file browser.
I get the usual long list of files,I move the cursor say to
the fourth from the top , enter the file and edit it ,so far so good.
NOW I use` ^O ` ie.` Ctrl O`. Here is the irritation -- The cursor
goes right to the bottom of the list. Is there a way of curing
this so that cursor stays at the last file opened ?
This is about the only aspect of Vim that I find annoying.
Help would be much appreciated.
Aug 23 '10 #1

✓ answered by pwilliams

Yes sicarie,and so far ` :Rex ` seems to be the only option.

4 2250
sicarie
4,677 Expert Mod 4TB
Here's what the vi doc I found said

*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
(not a motion command). {not in Vi}
{not available without the +jumplist feature}
Does that help? What are you trying to do when you use Ctrl+O inside the file?
Aug 31 '10 #2
Many thanks for your reply sicarie . No I'm afraid Ctrl+O does not work,as I say, it sends the cursor right to the bottom of the list ;Ctrl^ is slightly better taking the cursor to the very top of the list ; best of all so far is not a Ctrl Command but ` :Rexplore ` or ` :Rex `, this takes the cursor right back onto the name of the file that has just been exited . What I was trying to do by using Ctrl+0 within the file , was to get back from whence I came .

I have pasted the reference here:

:Rexplore This command is a little different from the others. When one
edits a file, for example by pressing <cr> when atop a file in
a netrw browser window, :Rexplore will return the display to
that of the last netrw browser window. It is a command version
of the <2-leftmouse> map (which is only available under gvim and
cooperative terms [
~
~
~
~
~
~
~
~
6,23-26 All
Sep 1 '10 #3
sicarie
4,677 Expert Mod 4TB
So if I understand this correctly, you would like to

1) open a file through vim
2) edit or perform some action in the file
3) execute a command to return to the area/list from which you opened the file in step 1

Is that accurate?
Sep 1 '10 #4
Yes sicarie,and so far ` :Rex ` seems to be the only option.
Sep 4 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dan Stromberg | last post by:
Are there any reasonably secure file browser implementations for unix/linux (and perhaps MacOS X and Windows as well) written in python, that are accessed over https via a cgi script? Thanks.
6
by: WindAndWaves | last post by:
Hi guys Thank you for all your previous answers. My new question is as follows: how do I create a folder/file browser in access 2003. That is, I would like the user to locate several files...
4
by: redneon | last post by:
I've written a simple application which connects to an FTP server and recursively lists the contents of the directories in this server in a ListBox. What I'm wanting to do is change the ListBox and...
4
by: Peter Larsen | last post by:
Hi, I want to be able to show a file browser embedded on a form - a browser which is similar to the browser you get by SHBrowseForFolder(). Is that possible ? Thank you in advance. BR Peter...
1
by: jharikrishna | last post by:
Hi Frnds I am working on c#. I want the information about to click the button in textbox How to Open the file browser dailog.
1
by: devil123 | last post by:
hey .. i am a beginner in visual basic ... i want a urgent help i have created a application which is having 2 text files as input ..now i have to do something like "click a button to browse...
1
by: Jables | last post by:
I am looking for a solution to an online file browser. The browsing is not browsing a persons harddrive, so it is isn't really a file browser, but it is browsing a tree of strings generated by the...
2
by: Tim Haughton | last post by:
In a styled WPF application, I need to write a custom file browser in C#/WPF. As it is styled differently to generic Windows apps, I cannot use the standard open file dialogs. Writing a tree or...
3
by: TheSaint | last post by:
hi there, I've started to build a GUI for my Mailsweeper by the help of QT4 Designer. I came across the problem that there isn't any prebuild file browser like Kdialog. I know some other...
1
by: alnino | last post by:
Hi, On a form I have a command button that allows a user to browse for a file (PDF, Word, etc…). This command button then stores a hyperlink to the file within an associated txtfield in the table....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.