Giter Club home page Giter Club logo

Comments (6)

dschuyler avatar dschuyler commented on August 24, 2024

I'm up for discussing what ctrl+p should do. Right now it will try to guess which other file you'd like to open.

  • with one file open, suggest 'alternate' file (like if it's a .c file, suggest the .h file)
  • with multiple files open, suggest the most recently used file (like ctrl+tab)
  • with no files open, suggest a new, empty buffer

In some cases, alternate files are included at the bottom of the list (in case the suggestion is wrong and the alternate was desired).

Something I don't like about this arrangement, is that it's not easy to know what it's going to suggest.

The navigation to select a file can be done with ctrl+p (or up arrow) and ctrl+n (or down arrow).

Typing in the p: prompt does have any effect at the moment. That bit is WIP.

from ci_edit.

aaxu avatar aaxu commented on August 24, 2024

What about using it to go to the next/previously edited files?
CTRL_TAB/CTRL_SHIFT_TAB can't be differentiated on my computer. Both show up as CTRL_I keys in curses, so unless we can figure out some hack to determine modifier keys (I really want CTRL_backspace :( ), then I don't think we'll be able to have this functionality. What if we moved this tab/file switching to CTRL_P?

from ci_edit.

aaxu avatar aaxu commented on August 24, 2024

I'm not sure how well the prediction thing would work. It seems like more often than not, it would maybe show up the incorrect file. But even if we do use some algorithms to predict what files the user wants to go to, I feel like this would be something that could be tacked onto CTRL_O as an enhancement rather than a new feature.

from ci_edit.

dschuyler avatar dschuyler commented on August 24, 2024

CTRL_TAB/CTRL_SHIFT_TAB can't be differentiated on my computer
It would be great to have that work.

so unless we can figure out some hack to determine modifier keys
afaik we'd need to find a terminal that did that. (or create/modify one to do it).

from ci_edit.

dschuyler avatar dschuyler commented on August 24, 2024

Here are the features I'm looking for (that can be combined into ctrl+p or separated)

  • switch to another open file (like ctrl+tab)
  • switch to an alternate file (like .c to .h)
  • switch to perviously opened files (like a 'recently opened' list)
  • open the source file that defines/declares a code element like a class or function (like symbol lookup)
  • open file referred to by #include/import (if the cursor was on such a line)
  • open url link in browser (if the cursor was on such)
  • maybe some other lookups, like define word or show results of equation.

That was kinda too much stuff to make separate commands for (I thought), so I wondered about a key that would say 'figure out what I want' to the editor. :) (which I grant, may be intractable).

So far I'm not sure if combining the first two items above are good.

from ci_edit.

aaxu avatar aaxu commented on August 24, 2024

I like the 4th bullet point. Been using it a lot recently after discovering it in some other editors. I don't know if there is a more suitable key for that though. I know the other editors have CTRL_SHIFT_R to search for all files in the project for declaration and CTRL_R to search for the current file for class/function declaration. Maybe we could just use it for switching to alternate files, though not sure how limited that would be. It could be for .c/.h for C, model/model_controller/model.html.* for ruby, etc so I could see that being useful.

from ci_edit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.