6 ms·
Seriously, we need multi-column editors
- invernomut0 12y agoHow to do it using vim: http://stackoverflow.com/questions/5131205/how-to-edit-text-in-multiple-columns-in-vim http://stackoverflow.com/questions/5131205/how-to-edit-text-... Seriously, just google it :)
- paperwork 12y agoHaha, I'm the one who asked that question years ago :) I'm the author of this article. Vim does come closest to what I want. However, I'd like to be able to do this in intellij, eclipse, sublime, atom, etc. In other words, my contention is that this should be a standard feature, like syntax highlighting or code folding.
- vortico 12y agoIs that Sublime Text, Atom, or Brackets? Sublime Text has great multicolumn (and grid) support, but I don't use the others. Although, if you use a tiling window manager and use lightweight non-single-window IDE/editors, you can just launch multiple windows and your window manager can do the rest. Multi-columns seems like a more natural job for window managers, so editors should be designed to naturally handle multiple windows and be able to quickly close and open them.
- colinramsay 12y agoThis was my first thought, and you're right. But what if the author means two columns as in a newspaper or magazine, where the same content continues off the bottom of the left pane to the top of the right one? Does anything support that? Would it be useful?
- ginko 12y agoIn Emacs you can have as many independent view to same buffer as you like.
- dktbs 12y agoEmacs provides this with Follow Mode: http://www.gnu.org/software/emacs/manual/html_node/emacs/Follow-Mode.html http://www.gnu.org/software/emacs/manual/html_node/emacs/Fol...
- rdtsc 12y agoInterestingly I find the default behavior more helpful. Usually if there are any declarations or some init code at the top and some use of those later, I would want to view the top of the file in one column and work or edit in another part without having both scroll synchronously. Sometimes I have the same file open in 3 or 4 columns if I need to see what is happening in multiple parts of the code in front of me.
- tomek_zemla 12y agoAnother option would be to have more options to display addition development related information in side columns. Code statistics, terminal window, program source code visualization, live browser output for Web coding and such...
- bluetidepro 12y agoI think that is what he/she means, and I agree. I think that'd be awesome to have. That way you are more efficient with your space available.
- Morgawr 12y agoThis is already present in many (if not all?) editors already. In vim or emacs you can open a new buffer/window/pane (whatever terminology is used) on the same file and put different views of the same file (with live changes) side by side. I often do this when I need to keep an eye on the header/import section of a file and also work at the bottom of the file at the same time. I'm pretty sure a lot of other editors/IDEs I've used in the past also support this. It's nothing new.
- masklinn 12y ago> This is already present in many (if not all?) editors already. No. Tiling is, but it doesn't behave as if you had a single file view wrapping across columns. Emacs does have that via follow-mode, but I don't think I've seen it anywhere else (though vim might have something equivalent to follow-mode)
- riquito 12y agoIt wouldn't. When you scroll a side, the others moves too, which is probably not what you want. Most editors with split views let you open the same file splitted and you can see two parts of the same file at the same time. That's useful.
- iandanforth 12y agoIt does? He means page wrapped, single file, multi-column views. Like multiple columns in Word.
- ukc 12y agoIt is Sublime Text using Package Control with this: https://packagecontrol.io/packages/SideBarFolders https://packagecontrol.io/packages/SideBarFolders
- VLM 12y agoAs in all tech, the future is already here, just very unevenly distributed. Fire up emacs, "control-x 3" and there you are. Next up will be googling about windmove-default-keybindings so that shift-arrowkeys does what you'd expect in an emacs frame (or has this become the default over recent years?). For a good time try control-x 2 and finish with some control-x 1.
- dmm 12y agoAdd winner mode to get undo and redo with your window layouts. C-c left and C-c right
- theRhino 12y agocan i second the 'just use emacs' argument? i look forward to the day i can fire up emacs on multiple 4k monitors its a bit tragic that a programmer doesn't already know this fact?
- mediocregopher 12y agoI very often have a vertical split in vim, both panes with the same file. I can skip around the file and look at stuff in one while actually writing code in the other. Is that more or less what the op is asking for?
- masklinn 12y agoI assume he wants the impression that the file wraps around to the same column, with the buffers synchronised across the split. Emacs does have that using follow-mode, I don't know if other editors do.
- 2mur 12y agoVim alone or vim+tmux is what you're looking for.
- jlarocco 12y agoEmacs already has exactly this built in with follow-mode. http://www.gnu.org/software/emacs/manual/html_node/emacs/Follow-Mode.html http://www.gnu.org/software/emacs/manual/html_node/emacs/Fol...
- verandaguy 12y agoSame with (Neo)Vi(m)
- masklinn 12y agoAre you sure it's equivalent to follow-mode, not just vertical splits? Follow-mode emulates the file wrapping to the next column when it reaches the end of a buffer, and if the cursor moves across the top/bottom boundary it'll appear on the other buffer instead of scrolling the current buffer. And the buffers are synchronised as a single "page". edit: apparently you can do that with scrollbind.
- sz4kerto 12y agoSecond image (http://falconair.github.io/assets/multicolumn/4k.png http://falconair.github.io/assets/multicolumn/4k.png) shows IntellJ IDEA, that has multi-column editing. The first screenshot (http://falconair.github.io/assets/multicolumn/retina.png http://falconair.github.io/assets/multicolumn/retina.png) shows Atom, that has multi-column editing as well. WTF? He also has an IQueueFactory class, that seems like some nice antipattern to me ;) *Edit: also, use QuickFIX, don't write your own. Been there, done that, does not worth it.
- masklinn 12y agoThe terminology really isn't clear, but assuming the author is not crazy and hasn't missed split windows, most editors have tiling systems, not multi-column systems: you can display different files tiled on the window, you can display independent views of the same file tiled, but it's not a continuous view of a file across multiple columns, where the end of one column is the starting point of the next, and scrolling is synchronised. Or at least if you can do that, I've got no idea how to enable it in IDEA. Emacs does provide that feature using follow-mode: http://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/Follow-Mode.html http://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/F... edit: it is apparently possible to do something very similar in vi/vim by using scrollbind.
- look_lookatme 12y agoI clicked the comments here first (bad habit) and presumed there was something more nuanced to the case the OP is trying to make... but you are right, it's quite the WTF. To be fair I think Atom hides the split commands behind a View->Panes menu and IntelliJ (or PHPStorm at least) has the command in Window->Editor Tabs. (All on OSX). So it's not super clear where the split window functionality is, but it's also not hard to read the docs for your editor.. Edit: Ah I see what the OP is saying now. I'd be surprised if this functionality isn't covered by plugins, though.
- paperwork 12y agoI'm surprised too, but there don't seem to be any such plugins (although vim apparently comes closes...never looked at emacs). What I find really interesting is that I seem to be in a _very_ tiny minority that wants this or even has given any thought to this. I expected that most other developers with modern monitors would want this. The comments here and on the blog show that isn't the case :)
- ramius345 12y agoEmacs has done this for years.
- guardian5x 12y agoAnd at least a hundred other editors. I don't get this post.
- rdtsc 12y agoPeople get to talk about their favorite editor. So it gets upvoted. Programmers love to talk about their tools.
- paperwork 12y agoIs it a common feature to lay out a single file in multiple columns? Not split panes. Not the same file split into two with two independent scroll bars. Multiple columns the way a single article is spread across multiple columns in a new paper?
- olivierkaisin 12y agoThis is a joke right? (Sublime has this feature baked in since day 0)
- paperwork 12y agoSplit pane/tiling? Can sublime layout single file in multiple columns? Note that I'm asking for a multi-column editor, not a multi-pane editor.
- IanDrake 12y agoVisual Studio - As many vertical tab groups as you need.
- whizzkid 12y agoYou often will not need to see whole class to implement things. cmd+f --> "string" ctrl+g --> "line number" in 4K tv example, you will need to focus your eyes too much that they will get tired after 30 minutes. Instead, zoom in and focus on the method you are dealing with. you may use; cmd+alt+2 --> for 2 columns layout in order to compare 2 files. Your eyes are much more important than text editors. Happy coding! Edit: Examples are given from Sublime Text 3
- kungfooguru 12y agoSeriously, use emacs.
- bdg 12y agoTo be honest I don't have this problem because I selected a tool set that does this already. Tiling window managers (Awesome, XMonad, etc) and VIM do all of this and more, and I use them every day with great ease. In fact, moving away from them and having to use a 'click + drool' GUI (Unity, KDE, Gnome, etc) to move windows around feels slightly painful to me now.
- jrmoran 12y agois that last screenshot intellij? If that's the case, the editor supports splitting windows https://www.jetbrains.com/idea/help/splitting-and-unsplitting-editor-window.html https://www.jetbrains.com/idea/help/splitting-and-unsplittin...
- masklinn 12y agoWhich is why I'd assume TFA is talking about something similar to Emacs's follow-mode[0], not mere vertical splits [0] https://news.ycombinator.com/item?id=2797790 https://news.ycombinator.com/item?id=2797790
- deleted 12y ago[deleted]
- voidon 12y agoHeh, are there any editors which don't support multi-column editing?
- paperwork 12y agoAll of them, as far as I can tell, other than (apparently) emacs and vim.
- Fiahil 12y agoI use Mjolnir[1] to arrange term, Atom or IDEA windows. It's quite efficient since you can switch/resize them very quickly and you don't have to rely on your full-screen-IDE's embedded terminal for console output. [1] https://github.com/sdegutis/mjolnir https://github.com/sdegutis/mjolnir
- gagege 12y agoVisual Studio has great multi-columns. Just drag any tab and snap it into place. Also, here's a simple solution: don't maximize windows. There's a lot of space on that screen that could be taken up by a browser, desktop icons, calculator, and any other thing you need instant access to. It's not multitasking(which I've heard is considered bad), if you're using all those windows to accomplish one task.
- masklinn 12y agoVisual Studio has tiling. So do almost all editors, so I'd assume that is not what the author is talking about. You can display files side-by-side, you can even display multiple sections of the same file side-by-side, but you can't have a single file view "wrap around" into columns. Emacs does have that feature via follow-mode.
- gagege 12y agoOh, I see.
- potomushto 12y agoI wonder if Atom could achieve that with CSS3 Multiple Columns
- paperwork 12y agoI just looked up css3 multiple columns. Great pointer. I'll investigate it, thanks!
- htor 12y agoSeriously, you need to learn how to use your editor.
- Someone1234 12y agoI must have different eyes to everyone else in the human race... It seems like on PC/Linux/etc every time resolution increases font size and everything else gets tinier. They might be taking up the same number of pixels on a 1080p and 4K display, but those pixels have physically shrunk. So the result is that millimeter to millimeter they have shrunk and your eyes need to focus on a smaller "thing." Staring at tiny text all day is exhausting, but yet a lot of people love to do it as they constantly rave about how 1080p or 4K give them "more screen real estate" (because now everything is tiny). This is another example of that. Instead of the OP just increasing the font size, they've let the text get smaller and smaller and are now complaining that they have too much wasted space. On all Windows machines I now run I use 125% DPI to try and make the text readable over long periods. On my Surface 3 I use 150% DPI which breaks a lot of stuff. Honestly as far as I am concerned Apple are the only one that got this right when they scaled everything so it stays the same size (in real terms) as resolution increases (effectively giving your text more pixels, so it looks smoother). Windows is terrible and Linux is worse. But since every other human seems to have cyborg eyes and is immune from eye strain I guess none of this matters...
- paperwork 12y agoWith modern monitors, I could increase the font size until it matches a toddler's alphabet book, I wold still have plenty of space left for at least a couple more columns :)
- flohofwoe 12y ago'CTRL-W v' in vim ;) Also, Visual Studio has vertical and horizontal tab groups, Xcode has "counterparts" where you can display 2 associated files side by side (for instance .c and its .h file), and tmux lets you setup vertical and horizontal splits for terminal sessions which is also very nice in combination with vim.
- deleted 12y ago[deleted]
- rdtsc 12y agoSeriously we've had those for decades. Press 'Ctrl+x 3' in emacs and you've split your buffer in 2 columns. Now you got a multi-column editor.
- mikhailt 12y agoTo the author: if this many people is confused about the difference between multi-pane and multi-column, your message isn't clear and it won't be to the developers you're asking either. Explain exactly what you want (I read the blog post and it gave me no clue to that) and the developers might understand what you're asking.
- paperwork 12y agoYou are right. I'm planning a follow up with more detail.
- BenderrTheRobot 12y agoWaste less space by turning your monitor to portrait mode. Not everything looks good on something intended for video.
- jhrobert 12y agoIt's funny that so many people missed the point and assumed the author is clueless.