5 ms·
Multiple carots, the minimap and ST2 picking your indentation strategy automatically by looking at the file (I work with badly formatted legacy code a bit, ther
by SCdF 14y ago
Multiple carots, the minimap and ST2 picking your indentation strategy automatically by looking at the file (I work with badly formatted legacy code a bit, there is no project-level strategy that applies) are the three reasons I bought it.
- silentbicycle 14y agoSome of my coworkers use sublime, and have been very excited about it. I used vim for several years and use emacs now, so probably a hard sell. Still, I get curious when people are Really Excited about other editors (because there may be ideas worth stealing and adding to emacs ;) ). What's the "minimap", the scrollbar that is a shrunken version of the document? The "multiple carets" feature seems handy. Are there any other standout features, compared to vim or emacs (not, say, TextMate)?
- roryokane 14y agoYes, the minimap is what you guessed it was. Other ST features that Vim/Emacs don’t have (by default, at least): • You can use proportional fonts (I use Verdana) • The interface chrome is graphical, not text in a grid. This allows nice details such as a drop-shadow from the minimap when it covers the text and proportional fonts in the file tree’s filenames. • On a Mac with smooth scrolling, you can scroll smoothly pixel-by-pixel, instead of choppily line-by-line. • You can easily rename a variable, by using Command-D repeatedly to select the instances of the names inside multiple carets. But I usually forget to do this until after I’ve already renamed just one instance of the variable, and then I can’t select the other instances without undoing that edit first, so it’s not that useful. • It uses Python as its scripting language, so you can use Python libraries easily, and don’t have to learn an editor-specific language. Similarly, it uses JSON for settings. But Sublime Text doesn’t have nearly as many editing shortcuts by default as Vim. For instance, there isn’t any hot-key to select inside a quoted string – Expand Selection to Scope is the closest, but it’s hard to predict what it will do and so it isn’t very reliable. You can enable Vintage mode, which emulates many Vim key-bindings and thus gives you access to that power. That mode has a few small problems – the biggest one for me is that the Esc shortcut to exit the current mode sometimes conflicts with the Esc shortcut to remove extra carets so you have just one. It’s too bad Sublime Text isn’t open source. Its plugin API doesn’t allow setting tabstops manually, which I would like so I could write a plugin implementing true elastic tabstops. Since I can’t implement it myself, I have no option but to beg the developer to implement that and wait.
- irahul 14y ago> You can use proportional fonts (I use Verdana) Vim uses what my terminal uses. No ideas if my terminal(terminator) allows proportional fonts, but I always have used monospaced. Proportional looks ugly to me when it comes to code. > The interface chrome is graphical, not text in a grid. This allows nice details such as a drop-shadow from the minimap when it covers the text and proportional fonts in the file tree’s filenames. Drop shadows? Umm, no thanks. > On a Mac with smooth scrolling, you can scroll smoothly pixel-by-pixel, instead of choppily line-by-line. Either I search for what I am looking for, jump to definition, or move screen by screen. I don't scroll - at all. If I did, I am reading lines of code, not rows of pixels. > You can easily rename a variable, I don't use ST and can't exactly understand what is unique here, but I am pretty sure renaming something is something vim is very good at. You want to limit the scope, select visually and run :s on it. > It uses Python as its scripting language, so you can use Python libraries easily, and don’t have to learn an editor-specific language. Similarly, it uses JSON for settings. Python is much more mainstream than vimscript, yes, but there are still people who don't know python and don't want to learn it. Learning python for them isn't very different from learning vimscript.
- lparry 14y ago>> It uses Python as its scripting language, so you can use Python libraries easily, and don’t have to learn an editor-specific language. Similarly, it uses JSON for settings. >Python is much more mainstream than vimscript, yes, but there are still people who don't know python and don't want to learn it. Learning python for them isn't very different from learning vimscript. You've quite obviously never tried to code anything in vimscript, have an axe to grind with Python, or are Tim Pope. Vimscript is a horrible abomination that's painful to do just about anything in. Python is far, far superior. (Vim lover and Ruby guy here, but I'd pick just about any language over vimscript)
- irahul 14y ago> You've quite obviously never tried to code anything in vimscript, have an axe to grind with Python, or are Tim Pope All your claims are preposterous. I have coded in Vimscript, I use Python and have no axe to grind; and I am not Tim Pope(duh). > Vimscript is a horrible abomination that's painful to do just about anything in. Python is far, far superior. I don't remember claiming Python is inferior to vimscript. Have you actually used vimscript, or are you speaking from superficial experience? Vimscript is not a general purpose programming language, but does the job of extending vim fine. I was in middle of writing a small function which syncs up nerdtree highlighting with bufexplorer buffer switch(came here to take a break). Here is what it looks like: function! ChangeBuffer() if bufwinnr(t:NERDTreeBufName) != -1 exe "normal! :NERDTreeFind\<cr>\<c-w>\<c-w>" endif endfunction let g:BufExplorerFuncRef = function('ChangeBuffer') The amount of general purpose programming involved is minimal. 1. BufExplorer provides a hook which takes a function reference. A variable assignment. 2. If nerdtree is active(simple function call), call the command to find the current buffer in nerdtree(vim specific normal command execution), and switch back to editing pane(again normal mode command) A good part of tasks make use of exe, nnoremap, iabbrev etc; and vimscript is powerful and pleasant enough for the rest(lists, dicts, simulated objects, variable namespacing...). It has it's quirks, but so has many mainstream languages - you know about the quirks when you are using the language, and avoid them.