8 ms·
As an Intellij user (and Emacs way before that) I'm trying to give this a chance, but I see no way to click-navigate through source code. Am I missing something
by kaffeinecoma 14y ago
As an Intellij user (and Emacs way before that) I'm trying to give this a chance, but I see no way to click-navigate through source code. Am I missing something? I tried installing SublimeCodeIntel, and that lets me (occasionally) navigate to symbols in the current file. But I don't seem to be able to click through to symbols defined in other files/classes. Am I missing something fundamental, or is this strictly the domain of the IDEs?
- kodablah 14y agoIt's not necessarily click-through as it is type-and-find. Ctrl+P to find a file, Ctrl+R (usually) to find methods/functions, etc. It's still very fast and productive.
- kaffeinecoma 14y agoI found that, but it cmd+r (I'm on a Mac) seems to only show you hits in the current file. The thing I'm interested in doing is clicking on a call to foo.bar() and have it bring up Foo.rb, right on the "def bar" method. Also a lot of the time the thing I'm trying to navigate to is library code that's referenced via require, vs something that's actually in my codebase proper.
- losvedir 14y agoWhat I do in such a situation is cmd+shift+f and do a project wide search (I leave that as the default in the "Where" field. You can tweak case sensitivity, whole word, or even just use a regex. It opens a new tab with your search results, and you can double click on a result to be taken to that place in that file. It's admittedly not as slick as what you're asking, but it serves me well enough in exploring a codebase.
- taterbase 14y agoCMD + K, CMD + B (Ctrl on windows/linux) opens up the gutter with all your files.
- mariusmg 14y agoYeah, you can search for it but function navigation is already IDE territory. That and refactoring :)
- benjaminwootton 14y agoIs anyone using the likes of Sublime for enterprise Java? I'm an Intellij power user but tend to use Sublime for Rails & other dynamic languages. Using the same environment all of the time would be nice.
- kaffeinecoma 14y agoI think that if you're using Java you might as well get some benefit out of the static typing- use an IDE that can put it to good use for source navigation. I'm a long-time Java programmer who's spoiled by tools like Intellij, and I cry every time I want to delve into a Ruby library that my code uses, but can't do so because the editor (even Intellij/RubyMine) can't find it. Oh, you want to jump into the "foo.open()" method? Here are 58 choices- pick the one that looks like it might be the one you want.
- kamaal 14y ago>>Is anyone using the likes of Sublime for enterprise Java? There is no reason why you must subject yourself to that sort of a torture. The IDEs are designed to make your life easy for that kind of verbosity and boiler plate.
- mhd 14y agoWell, given a sufficiently advanced code parsing module, I'd consider Sublime Text an IDE. It's just that CodeIntel might not be sufficiently advanced enough (for your language of choice or in general). It's a port from the Komodo editor, where it doesn't work perfectly, either. I don't see anything really fundamental that should stop an improved/better plugin from working, the hooks should be there.
- deleted 14y ago[deleted]
- base698 14y agoFound a ctags module. https://github.com/SublimeText/CTags https://github.com/SublimeText/CTags
- falling 14y ago> Does Sublime not support ctags? Yet another win for emacs/vim! sorry. https://github.com/SublimeText/CTags https://github.com/SublimeText/CTags
- jpeterson 14y agoWhy do you want to use your mouse while coding?
- mitjak 14y agoBecause you don't always know your code base very well. I almost always use vim but when a new large project comes along I've found no better way to read through it than with a mouse.
- kaffeinecoma 14y agoI don't- but for discoverability purposes, I'm more likely to find success by clicking on a method name than by randomly pawing keyboard shortcuts. Once discovered, I'll happily take the shortcut.
- kstenerud 14y agoI use the mouse all the time while developing software. And oddly enough, it doesn't diminish my productivity, since I generally spend more time thinking than typing, and use an IDE to get any boilerplate out of the way or look up API calls or refactor.
- justinhj 14y agoOnce you are used to an environment where you can do everything with no mouse, it feels very clunky and inefficient when you are in an IDE and you need to constantly switch between typing and using the mouse. If you had to stand up and sit down in order to open a file menu you would think that was silly, but could make the same argument for it that you did for the mouse.
- kstenerud 14y agoFalse analogy. Standing up and sitting down does absolutely nothing with regards to file operations.
- jules 14y agoBecause when browsing code it's faster to click on a method name than to navigate to it with the keyboard.
- swah 14y agoIts a text editor first. (Writing a lightweight IDE hasn't worked very well yet IMO).
- kstrauser 14y agoIt's language dependent. For instance, I've installed SublimeRope for Python refactoring. When I open a new project, I run the "Rope: New Project" command and give it the source directory of the project and the path to the virtualenv I'm installing it in. I'm looking at a Django project right now. At the top, I see something like: from django.conf.urls.defaults import patterns, url urlpatterns = patterns('', [...]) Moving to the "patterns()" call, I press command-F3 and it opens "/Users/kirk/.virtualenvs/portal/lib/python2.7/site-packages/Django-1.4-py2.7.egg/django/conf/urls/__init__.py" and puts the cursor on the "def patterns()" line. It works pretty well.
- city41 14y agoI'm also an IntelliJ user, and this really only works when you are coding in Java or other strongly typed languages. IntelliJ's ability to do this with JavaScript and Ruby is abysmal at best.