Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Quickly should respect pwd #15

Closed
acdesouza opened this issue May 4, 2014 · 6 comments
Closed

Open Quickly should respect pwd #15

acdesouza opened this issue May 4, 2014 · 6 comments
Assignees
Milestone

Comments

@acdesouza
Copy link

Instead of index all /~, Open Quickly should start at pwd.

@qvacua
Copy link
Owner

qvacua commented May 4, 2014

By pwd you mean the parent directory of open file? Currently, we do the following:

  • New File ---> current workspace is ~
  • Open files (of a window) ---> current workspace is the common parent directory of the open files

Thus, if you have opened files in /Users/XYZ/Project/Awesome, then only that directory is indexed. Is this what you mean or do you mean something else?

@acdesouza
Copy link
Author

Almost that.

What I did:

  1. Open VimR;
  2. NERDTree;
  3. On, NERDTree window: B, to see Bookmarks;
  4. Select a Bookmark, Enter on it;
  5. :pwd - shows Bookmark path(/Users/XYZ/Project/Awesome);
  6. Cmd + Shift + o

It indexes from /Users/XYZ, instead of /Users/XYZ/Project/Awesome.

@qvacua
Copy link
Owner

qvacua commented May 5, 2014

I'll try to implement the following, assuming #3 (open in new tab) is already implemented:

  1. new window opens: ~
  2. open files using Open in New Tab: the common parent directory
  3. when you issue :cd XYZ or the working directory is set to XYZ in Vim by for instance a script like NERDTree: XYZ

@qvacua qvacua added this to the v0.0.3-4 milestone May 5, 2014
@acdesouza
Copy link
Author

Looks great!

How can I help?

@qvacua
Copy link
Owner

qvacua commented May 5, 2014

1 and 2 are already there. As for the 3rd point, if you've got ObjC + Cocoa experience, it should be quite easy. Fork VimR and I'd suggest to do the following: MMVimController of MacVim (-Framework) has -vimState which is an NSDictionary with a key @"pwd". However, when vimState is set, no delegate method is called. Probably the best way would be to add a delegate method for that and implement it in VRMainWindowController to set the workingDirectory property of VRWorkspace.

Please prefix your commits with the number of this issue, ie #15 such that we have a link between the issue and its associated commits.

@qvacua qvacua modified the milestones: v0.0.3-4, v0.0.4-5 May 20, 2014
@qvacua qvacua self-assigned this May 22, 2014
qvacua pushed a commit that referenced this issue May 24, 2014
@qvacua qvacua closed this as completed in ad3d361 May 24, 2014
@qvacua qvacua reopened this May 25, 2014
@qvacua
Copy link
Owner

qvacua commented May 25, 2014

consumes too much cpu time somehow

qvacua pushed a commit that referenced this issue May 25, 2014
qvacua pushed a commit that referenced this issue May 25, 2014
qvacua pushed a commit that referenced this issue May 25, 2014
@qvacua qvacua closed this as completed May 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants