Should a Project Tree plugin like NERDTree be used alongside a fuzzy-searcher plugin like CtrlP? [closed] - vim

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Before you light all fuses; I know this might come off as quite opinion-based. I am asking for functional differences, not "is X better than Y and why".
I have been using fuzzysearcher-plugins for some years now, as my previous employer quickly made mockery of me for "needing to actually SEE my files". I've been getting along with CtrlP for a while, but more often than not, when I see a Vim-user whip up his environment, there's NERDTree.
Am I missing out on any important functionality?

Depending the the nature of your project the structure could be very important. It maybe helpful to see you project files. However the use of an always open NerdTree instance is probably not worth it. Please see Oil and vinegar - split windows and the project drawer.
As for exact functional advantages of having a file explorer always open, I seriously doubt it. I think you would get much more usage out of something like projectionist and of course using a fuzzy finder like you are currently doing. Personally I use Tim Pope's vinegar so that if I need a file explorer it is a simple - away.

First you have to understand that Vim already comes with a rather powerful file explorer called netrw (:help netrw) so there's actually no real hard need for another file explorer plugin like NERDTree. But netrw is not really designed to be used as a "side-panel" like those found in other editors and IDEs: "desire" for that feature is what prompted the creation of NERDTree which closely mimics those "side-panels".
Both NERDTree and netrw give you a familiar file navigation interface that's quite handy when you don't have a good knowledge of the project you are working on: they give you a comfortable experience and therefore are quite valuable.
When you know your directory structure well or use alternative means of navigation (I'm thinking about tags), a file explorer — especially one that's "always on" — is not that useful and it's quite legitimate to prefer the simple :e and/or :find or the higher level abstraction provided by CtrlP, FuzzyFinder, Command-T and friends.
I usually prefer :e, :find, :tag and related commands to using a file explorer but there's always a time when using one is more efficient and, when that time comes, netrw is only an :Ex away.
Both navigation methods are not mutually exclusive at all.
A core aspect of the issue worth discussing, IMO, is the perceived need for such a "side-panel". Do we really need to have a list of the files in our project visible at all times? What's the benefit of such a feature when you consider that you never look at it and, really, never use it unless you need to open or interact with some files? Since you have to switch your focus from the editor to the file explorer anyway, why not simply, well… "open" the file explorer when you actually need it? Of course, the NERDTree window can be toggled but, most of the times, it's just left open. Simply because that's what most people are used to.
Now, comformity, lazyness and ignorance also come into play: NERDTree is listed as a "must have" in every blog post and, AFAIK, it's also provided by default in every crappy distribution so people often install it right away, without even knowing about netrw. The same could be said about CtrlP, of course.

Related

Should I invest Time Learning Emacs? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I know that this question has been asked many times before. However, I want to take everything that I have read about Emacs/Vim from other posts, give my own understanding of the situation, and request feedback from senior developers.
Here is what I see as the advantages of each type of IDE:
Advantages of Modern IDE
Many features work with little hassle or need to configure like: Text
completion / autogenerating closing tags Useful warnings tailored to
the language
Solving issues like the ones above often require a
significant time investment. I know that you become faster at finding
and installing the packages you need, but it seems like every
extension you need in a traditional editor is much more readily
available or already built-in in modern IDE / Code editor.
For compiled languages like Java, IDEs like IntelliJ seem to have a clear
advantage in the way they are able to analyze code and for the robust
debugging they offer. As far as I can tell, even if you spend a lot
of time configuring Emacs, there is no substitute for IntelliJ even
no matter how much time you invest.
Emacs/Vim Advantages
Though there is a lot more time investment, it seems like there is a strong consensus that the time investment has a significant payout for many developers. I do not necessarily even know these benefits, but I just know that Emacs/Vim is a very powerful and loved tool by many many highly experienced devs.
Extensibility
Availability (you can use either in a terminal very easily)
Great for SSH
Full org mode (versus the much more limited org mode in VSC)
Model-editing / Vim keybindings can make editing much faster once you learn it. Also, key chords in Emacs can make you much faster and keep you on the keyboard.
Related to above, but it seems that the more you commit to Emacs, the more you can get out of it because of the extensibility. Whatever your work flow is, usually there is a way to set up Emacs to take care of the whole nine yards for you.
I am guessing because of the above, it probably helps with your focus. You can keep everything inside emacs.
So my only big question is, "Do I have an accurate understanding of the advantages of each IDE?" A harder to question answer for me is, "Do I want to invest more time in learning Emacs or Vim?" (sidenote: will probably go with Doom Emacs) Right now I have been programming for two years. I am currently learning Javascript to help me get employed and will be focusing on that for months in the future. I keep going back and forth on whether I should just go with VSC and focus on Javascript or if I should learn Emacs concurrently.
I would recommend activate a Vim plugin within your IDE. That way you will learn bit by bit without affecting your productivity. After some time you can judge by yourself if it is worth learning more and go full Vim or just use the IDE. I use Vim for 5 years and I still have to take a look at the Vim documentation everyday. But I do it because it is fun to learn to do complex text manipulation with few strokes. If Vim does not suit you, try Emacs, then. But only trying each one will tell you what fits your style.
Here is a quick intro to Vim

vim: key-binding customization -- how far is too far? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What are the pros and cons of changing vim's default keybindings? How far is too far? As a new learner of vim, I already have a glimpse of its power, but I am also much bothered by some key-bindings that don't make sense to me. Already, I have mapped <c-l> and <c-h> to w and b respectively. Now I'm itching to find a new key for $ so that I won't have to press shift just to go to the end of line. To my mind, the basic motion keys should be one-button operations (my mapping above notwithstanding, I still use w and b in conjunction with d and c etc), and spatial logic should trump symbolic logic in deciding their placements. - is currently my candidate for replacing $ because as a shift-free key to the right of 0 (for the beginning of line).
Should I go ahead, and thus opening the floodgate for potentially myriads of other changes? Or should I try to adapt to the default? One thing that's holding me back is my concern about unintended consequences that I, as a newbie, cannot foresee, including loss of functionality (such as what the - currently does, which doesn't seem like much to me). In addition, I'm not sure how I feel about customizing vim so much that I can work only with my vim and no others. Are these concerns valid or overblown? Thanks.
While I agree that some vim key-bindings can be awkward, you should start off following the defaults in the beginning. After some time most of it becomes muscle memory and it shouldn't bother you much. If after a long time you still feel uncomfortable, feel free to rebind some keys. For example I have <CTRL-S> bound to save because it's easier than pressing <ESC>:w<CR> and less confusing when I'm working with other editors.
If you start rebinding too many keys too early, you will find it frustrating to use vanilla vim (for example on a remote machine).
As for your examples, I personally think <c-l> and <c-h> are harder to press than w and b. For example cw is a common vim operation and can be done using one hand compared to c<c-l>.
I say, go for it. Although it appears that you have already learned the vim model essentials somewhat well, there's no reason not to adjust it to your personal needs and preferences. One shouldn't aim to target the lower common denominator, even if "plain vi" is pretty high as such. Although I don't exactly know what's the case with C-l and C-h if you also use w and b comfortably, there's always a case for meaningful helpers.
If you are worried about ssh'ing to foreign machines without your vim configs, worry no more. Vim has a satisfactory remote editing capabilities; edit over SSH/SCP locally.

How to set up this specific vimrc configuration [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I don't have much experience and I hope you guys can help me, because nobody around me can.
I am starting to work with Vim and I am setting my vimrc now, but that's a lot of work, and I want to focus on learning how to use it, and not waste my time for now on configuring simple stuff like text highlighting or indentation, things that everybody has... So I want to use this vimrc https://github.com/spf13/spf13-vim which is generally provided by Steve Francia.
The problem is that he uses gitHub, and I want to have everything locally on my machine, can you tell me how to do that? Including all the plugins, of course.
... that's a lot of work ...
Be prepared to continually spend some time to learn new Vim skills and improve your configuration (or chose a different editor / IDE that offers a more carefree, but also more restricted experience). Bram Moolenaar, the creator of Vim, has made a compelling case for good habits of text editing. Trust me, it's not a waste of time, but you need to overcome your need for instant gratification.
I would suggest just turning on the indent and syntax features you mentioned, and call it it a day. Don't worry right now about extensions you don't need that load themselves.
$ cat > $HOME/.vimrc
syntax on
filetype plugin indent on
^D
$
Yes, I use something like his setup (I use Pathogen) and sure, it is kind of cool to just be able to clone a git module into my .vim/bundle directory, but that's an elaborate configuration that's just a distraction for you right now.
The absolute minimum you need for programming in Vim is in the accepted answer. I'd add set hidden and a few others to the mix but you don't need much more. Especially weird shortcuts that hide native features or useless Git integration plugins.
Don't install any plugin from the start, actually, especially piles of crap like that kind of "distribution". Follow $ vimtutor, multiple times if needed. Learn how to use :help. Don't copy anyone else's vimrc verbatim and, if you take something from a random vimrc on the net, read the relevant part of the documentation to be sure that you understand what it does, how it does it and why. Your ~/.vimrc and ~/.vim/ will grow and shrink with you, as you go. That's how it's done.
If you are looking for beginner-level info, LearnVim is a rather nice introduction to Vim that you install as part of Vim's documentation. I'd suggest you install it and read it carefully: it's opinionated but full of low-level information that will doubtlessly help you in the future. I sure would have loved reading it when I started.
Like Ingo said, if all that seems overwhelming nobody will mock you for deciding to use another editor/IDE. Of all my team, I'm the only one who uses Vim (hell, I don't even use it for everything) and the code we write is equally good and/or bad.
Anyway, if you really want to go the "distribution" route, you'll have to learn Git and Github's basics and follow the instructions provided by the distribution's maintainer.

Any alternatives to Eclipse? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm a long-term Linux developer, and I've been using Eclipse to do all my coding for years. It's got decent syntax highlighting for a range of languages, good project management, top-notch integrated VCS support, and its Java support is superb.
Unfortunately it's also huge, rather clunky, and has a number of bad habits ranging from files disappearing irrevocably if you accidentally undo in the project view after creating a file, to mysterious lockups where it will sit and think at 100% CPU for a minute, to an extremely clumsy package manager that seems to become more and more fragile the more stuff you install with it. So I'm looking for suggestions to an alternative to Eclipse that I can try.
There are, however, some provisos.
There are two main styles of IDE. There's the Eclipse style, where a project is a directory; moving files in the project moves the files in the directory, so the project view can be treated as a file manager. And then there's the Visual Studio style, where the project is an abstract thing that does not necessarily match the layout on disk, and a project can contain files from multiple directories and moving files in the project doesn't touch the disk. This latter style I cannot stand, as it simply doesn't match the way I work. Unfortunately most Linux IDEs I've found work like Visual Studio. e.g. qtcreator, netbeans, monodevelop, etc.
I must be able to create a raw, unmanaged project, where the IDE doesn't try to build stuff, debug stuff, or touch the files in any way other than just editing them and managing them. This is because most of my stuff tends to get built from the command line. For example, Code::Blocks, which otherwise looks excellent, insists on all projects having a managed build system with build configurations etc, and won't take no for an answer, even if said build system is totally irrelevant to what I want to do. Integrated build systems are all very well but if I can't just point the IDE at a directory full of files and edit them, I'm afraid it's useless to me.
The languages I work in are C, C++, Java, Lua, shell script, Vala, and a myriad of other things, so something with decently robust syntax highlighting would be nice.
I realise that I'm being quite picky, but IDEs are a very personal thing, and, well, that's how I work. I don't dislike Eclipse enough to warrant changing my workflow, but I would like to know if there's something better out there that I can use with the same workflow...
I'm not really a very experienced programmer, I only have about 3 years of experience, but during those three years I have become completely disappointed with every IDE that I used.
I tried Visual Studio, Eclipse, NetBeans, IntelliJ IDEA (that was the most horrible of them, probably), Qt Creator (this one was the nicest, for Qt projects). All of them were too slow, clunky, too "intrusive", had a lot of features I didn't even need and using them was a real pain. So here is what I did.
I uninstalled all those IDE's, installed the good old gvim text editor, downloaded a nice color scheme for it, installed a good font for programmers (terminus), installed a few nice vim plugins, learned the VIM commands, learned how to use my tools (GNU make, g++, cvs, git etc.) and lived happily ever after.
The advantage of Vim is that it's lightweight, does not hog up your system's resources, does not tell you what to do, yet it is powerful enough to be one of the best text editors out there.
However, if you find Vim hard to grok, I suggest that you try Geany, a lightweight text editor for programmers. Also, I have recetly checked out Code::Blocks and it seems close enough to be good. It's not good for Java development, though, but for C++ it's decent. So, you know, pick your poison :)
How about JEdit?
I highly recommend Intellij Idea. As of about a year ago they've got a free Community Edition.
Since you are using Linux why not use xemacs (http://www.xemacs.org/)
To get an idea how to set it up for various languages you can look at this:
http://www.xemacs.org/Documentation/packages/html/prog-modes.html
Then for Java, you can look at http://jdee.sourceforge.net/
Emacs is very flexible, so you can get it to work as you desire, but, it will require more effort on your part that using a standard IDE, such as Eclipse.
When I don't want to wait for Eclipse to load I just use gedit - it's fast and has syntax highlighting.
You can open the sidebar to jump between open files or use the file browser and the bottom panel has a terminal to make in. If you use the External Tools Manager you can add custom scripts to be run by any shortcut key combination.

What's so great about TextMate? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Almost every developer that uses a Mac practically worships TextMate. Why? What extraordinary features does it have that other text editors and IDEs don't? I did a quick search and the only really useful feature that I found that most other editors lack is the column selection option, but I wouldn't use a certain editor just for that. What makes TextMate so amazing?
TextMate was the first app I bought when I switched to the Mac a few years ago.
The features I like most are:
bundle support
clean UI
project support
shell integration
fast for small files (fast startup time)
HTMLTidy built in
CSS and XHTML validation integrated (needs online connection)
but it also has some drawbacks:
slow for big files
lack of updates (for some time now, but TextMate 2.0 seems to be alive)
The main selling point is the ability to extend the UI using bundles, which are basically just shell scripts. It is also fairly lightweight.
I think the appeal of TextMate is that its not bloated ... its has just the right mix of text editing / IDE features, implemented in just the right way :)
A lot of editors have column selections (although in a lot of them its buried deep down). The actual fact TextMate is liked is it's bundle system, which makes some repetitive programming tasks much easier. It's not considered a replacement for languages that have IDE-s with "intellisense" support (Java, C#, etc.), but it's really useful if you want to create programs in a scripting language like ruby or python.
TextMate is very powerful and at the same time usable, intuitive, elegant and lightweight.
On the other hand e.g. the two most popular Unix editors Emacs and Vi(m) are both very powerful but IMHO(!) their usability is not up to todays standards. (I use all three of them but think TextMate is by far the best.)
I've been trying to use TextMate as a replacement for Emacs. So far I'm not sold, though I like projects, simpler/cleaner UI, and the idea that it's extensible using python, etc. (I've never mastered elisp).
Things I don't like [in comparison to Emacs]:
no ability to swap point/mark or return to previous marks.
movement keys don't automatically take you out of inline search.
tags not so great (ex: no symbols can be found in java files without classes).
completion only searches current file.
NOT OPEN SOURCE.
Okay, I still want to give it a fair shot, but mostly I'm just missing Emacs' superior functionality and feeling increasingly forgiving of its challenging UI and more willing to try to learn elisp for real. Even for projects, using emacs desktop-save in a project folder can accomplish nearly the same thing.
-taranaki
Textmate basically has all the power of <insert your favorite unix editor here> with a nice Mac OS X UI wrapped around it and a great plugin system using bundles, of which hundreds are available and most are either good or awesome.
Community support.

Resources