Coder Social home page Coder Social logo

Comments (7)

jbarnette avatar jbarnette commented on May 5, 2024

God, yes. This is the Emacs behavior I miss most.

On Oct 21, 2012, at 4:23 PM, Will Farrington [email protected] wrote:

I talked with @nathansobo a bit about this in Kona. Basically, one of Emacs' best features is it doesn't couple splits to buffers, which makes opening and closing splits really powerful.

What I'm proposing is:

Decouple buffers from splits on the backend
Maintain the current Cmd-W behavior (that closes buffers and then eventually a pane)
This way the crazy Emacs-loving types like myself don't get frustrated with the splits, but the ST2-style behavior can remain default for everybody else.

Here's basically what I'm proposing to be able to do, in slightly Emacs-ish terms:

window.keymap.bindKeys '*',
'ctrl-x 0': 'editor:close-current-split-unless-last-split'

window.keymap.bindKeys '*',
'ctrl-x 1': 'editor:close-all-splits-except-selected-split'

window.keymap.bindKeys '*',
'ctrl-x 2': 'editor:split-down'

window.keymap.bindKeys '*',
'ctrl-x 3': 'editor:split-right'

window.keymap.bindKeys '*',
'ctrl-x 5 2': 'core:open-new-editor-for-selected-project'

window.keymap.bindKeys '*',
'ctrl-x 5 0': 'core:destroy-editor-unless-last-window'

Reply to this email directly or view it on GitHub.

from atom.

defunkt avatar defunkt commented on May 5, 2024

I love this behavior but how does it work with tabs visually displayed on the UI?

from atom.

wfarr avatar wfarr commented on May 5, 2024

I would say they're fundamentally different approaches.

Default behavior enabled by a provided-by-default extensions would be the way things work now but also displaying tab bars in each split. Those of us who want something different would just disable that extension and use the "poweruser" split one.

from atom.

defunkt avatar defunkt commented on May 5, 2024

👍 🎆

from atom.

wfarr avatar wfarr commented on May 5, 2024

I've been hacking a bit on something to fake parts of this until we can talk about how to support it properly:

rootView.command 'wfarr:close-current-split', =>
  currentEditor = rootView.getActiveEditor()
  oldEditSessions = currentEditor.getEditSessions()
  currentEditor.pane().remove('*', false)
  rootView.adjustPaneDimensions()
  rootView.focusNextPane()
  newEditor = rootView.getActiveEditor()
  newEditor.setEditSessions(newEditor.getEditSessions() + oldEditSessions)

window.keymap.bindKeys '*',
  'ctrl-x 0': 'wfarr:close-current-split'

from atom.

nathansobo avatar nathansobo commented on May 5, 2024

https://www.pivotaltracker.com/story/show/38595177
https://www.pivotaltracker.com/story/show/38595299

from atom.

lock avatar lock commented on May 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

from atom.

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.