Using vanilla VIM within Visual Studio? - visual-studio

I have looked at some related posts, such as Vim as Visual Studio IDE.
The poster seems to want to bring the full power of VIM into Visual Studio, which I understand to be a fairly messy procedure. This is not what I want.
I just want plain vanilla VIM to be functional with the VS IDE. That is, all I want is to be able to switch between Normal and Insert mode (for starters), where I can move through code within Normal mode and type in text within Insert mode. Using the search and marking features would be nice as well, but I just want to make one step at a time. Of course I can just open up a terminal and VIM through the source code, but I would not have the useful VS IntelliSense at my disposal.
I am asking for suggestions/advice on how to achieve the above but a good reference (book, article, another stackoverflow post, etc.) on how to achieve the above also suffices for an answer.

I'll caveat this answer by saying that I don't use Visual Studio, but the options available are similar regardless of the IDE.
If I understand your question correctly, I think you have two options:
1) Install a vim emulation plugin. This should be able to integrate basic vim functionality into the IDE off the bat. Vim by vscode looks like it might satisfy your requirements; the repository states that it implements Normal Mode and Insert Mode, searching with / and ?, and some mark features. (source: ).
VsVim by Jared Par, is also another option, although less well documented.
2) Set up vim as an External tool in your IDE. Open the External Tools (Tools > External Tools). Set the command to point to your vim installation and the arguments"+call cursor($(CurLine)$(CurCol))" $(ItemPath) (you might need to play around with escaping to get this to work). This should open the current file in native vim at the current position. To make this transition as seamless as possible, I would recommend creating a shortcut. Were you to choose this option, you could also experiment with utilising the other arguments provided by VScode, like passing over the currently selected text over to vim, for example.
Out of the two, installing a plugin is quicker and easier and might suit your needs. However, you may get frustrated at the differences to native vim - the lack of support for some features, the inability to configure using a vimrc and through native vim plugins. Ultimately, the right option will depend on how you use Vim at the moment. Personally, I settled for the second option.

Related

Installing environment for GO programing language

I would like to start programming in GO. As I am a Windows user, I understand that it possible to do so using the GO plugin for NetBeans.
Until now, I have written GO programs in text files and run them using the command prompt, but I prefer to use another platform/environment so I would be able to debug the programs.
The code examples in this forum are syntax highlighting and seem to be taken from an environment like Visual Studio. Does anyone know about the environment?
I would appreciate a simple solution. Thank you! :)
IDEs built specifically for Go and still actively maintained:
LiteIDE: http://code.google.com/p/golangide/
Portable and fast with build in debugger
GoWorks: http://tunnelvisionlabs.com/products/demo/goworks
Based on NetBeans 7.3, standalone application or NetBeans plugin
Googling you can find several IDE, for instance:
http://go-ide.com/ or
https://code.google.com/p/goclipse/
You may find this question gets closed as it's quite subjective, and a FAQ. However, the simple answer: from your description, it seems likely that you would be comfortable with goclipse.
More complete answer: there is no "one true environment" for Go development. The code examples you see here are coloured using Stack Overflow's syntax highlighter, and were submitted in plain text. You'll probably find highlighting and utilities available for most major editors. For example, I use Vim which has a plugin to run gofmt on the current buffer.
I believe some Windows users are fond of Sublime Text 2's GoSublime plugin. A more complete list of development tools can be found here.
You don't really need an IDE to develop using Go. I'd encourage you to spend more time working with a good editor and the command line. Getting to know the tools already distributed with the language is essential IMHO (go, godoc, gofmt). See also Debugging Go Code with GDB.

Is there a vsVim User Guide?

I've just recently downloaded vsVim to use it with Visual Studio 2010 and join the Vi way. But I haven't been able to find information regarding the specific vsVim documentation.
I know how to use Vim (basic use, nothing even intermediate) but I would like to know if there is something that is still missing from the vsVim implementation, or some special feature.
So could anyone point me to a good resource about vsVim?
Thanks for any help
Jared has said that the git issue list is the main place he tracks feature requests and issues - so having a look at requests should give you an idea of what notable features are missing.
There is a Wiki, which explains things such as (intended) nonstandard behavior. Also, watching the GitHub repository is a good way to learn both what is and isn't implemented in VsVim and also to learn Vim features that you didn't know about. I've certainly learned a number of things about Vim from feature requests that are posted there, etc.
There are many things missing from the VsVim implementation, and there always will be. There are just certain areas of Visual Studio that you can't accurately layer Vim on top of (for example, the mismatch between the way Visual Studio handles documents, windows and tabs and the way that Vim handles buffers, windows and tabs). However, more and more is supported continuously, and you can always submit a pull request. Jared is very friendly and good to work with. I started using VsVim a year and a half ago and already much more is supported then when I started using it.
If you are wondering whether you are doing somethign wrong or whether it just isn't implemented in VsVim, a good thing to do is to pop open Vim and use its :help feature to find out. You can always submit an issue on GitHub, or if you really want to learn Vim in a detailed way, you could work on implementing a feature.
Finally, the documentation is incomplete, but since it is a wiki, you are welcome to contribute to it as you learn.

Emacs as IDE: Handling a project directory?

I've always used emacs for small projects (and Visual Studio for large ones). I was wondering what the alternatives are for handling a directory structure within emacs, something like the solution explorer in VS. Thank you.
You should also have a look at eproject for something that's more lightweight while also allowing you do to some pretty cool stuff (like project-specific config settings, etc.)
ECB, the Emacs Code Browser, which is built on CEDET, if I am not mistaken, is one you should look at.
Myself, I've always found that I get by well enough using etags and ido-mode. You might also want to look at Speedbar (part of CEDET) as a halfway house between more minimalist solutions and ECB.
I don't use it myself, but it sounds like CEDET is what you are looking for:
Emacs already is a great environment for writing software, but there are additional areas that need improvement. Many new ideas for integrated environments have been developed in newer products, such as Microsoft's Visual environment, JBuilder, or Eclipse. CEDET is a project which implements several advanced features developers have come to expect from an Editor.
The Emacs wiki also has this page with some tips for IDE users.
See also: http://www.emacswiki.org/emacs/Icicles_-_Support_for_Projects.

How do I set up Visual Studio 2008 to program in Perl?

My company gave me VS2008 for web development in C#/ASP.NET. I do a lot of Perl programming too and I'd like to start using VS for that so I can have a consistent work environment... but am having real trouble figuring out how to do so.
VS has a lot of nice features but seems pretty hostile towards languages it doesn't support out of the box. Is it really or do I just not "get" the VS way of doing things?
I usually write Perl scripts using TextPad and the features I'm used to having are pretty basic.
line numbering
soft line wrapping
syntax highlighting
auto-indenting in/out after open/close brace
auto-indenting to the same starting point as the previous line
brace matching
run scripts from within the editor
capture script output in an editor pane
dbl-click on error message jumps to the line where the error occurred
How do I at least get the above features in VS2008?
How can I get advanced features like:
code folding
intellisense
code-completion
integrated perldoc
VS-style debugging and code tracing
on-the-fly error detection
etc
(I see one possibly relevant online discussion in an ASPN mod-perl mailing list , but don't understand what, if anything, it means to a guy like me.)
-- added --
I'm aware of other editors and IDEs out there: vi, perlmode-emacs, Komodo, E, TextMate, etc. This question is not about what other editor or IDE I should try.
While I appreciate your suggestions, I'd rather read them in a thread like "What editor should I use for Perl" and not "How do I set up VS to accomplish my goal"
-- added --
After doing some additional research I've concluded that you just can't get there from here. The only option would be to write my own language plugin. Considering the time commitment to make something usable I think I'm just better off using a different editor. Thanks anyway guys
I use VS2008 for .NET stuff, but I'm completely sold on Komodo for Perl editing. The full Komodo IDE is worth the money if this is your job and like/need to use a debugger, but even the free Komodo Edit is a terrific Perl editor.
I agree, I really like Komodo as well for an IDE. Its solid and easy to use. I tend to use Vim a lot instead of an IDE, but that's just personal preference.
Check out Komodo though, its worth the look.
Regards,
Jeff
I heard rumors of there being a .NET implementation of Perl, called IronPerl, but except for that, I don't think there is any sort of plugin for Visual Studio. I would suggest just using one of the many tools out there that are designed for Perl.
There was something called "Visual Perl" wich worked with Visual Studio.net 2002 and was needed Perl Dev kit tool, but I don't how comatible is with VS.net 2010.
Looks like you can do this via the Managed Package Framework if you are willing to put the time in.
You can decrease the amount of work required by just setting up syntax coloring

Windows-based Text Editors [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
Other than Notepad++, what text editor do you use to program in Windows?
Another vote for gvim (about, download). I think once you learn the keystrokes to control it, you won't want to use anything else.
Plus, there is the added benefit of being able to use it on just about any platform, including the nice Windows port.
Sublime Text is amazing.
GNU Emacs is my preferred text editor and it works well on Windows (copy/paste actually works as expected) It's also available on all major platforms so you can reuse your knowledge if you jump around OSes like I tend to do.
I really like JEdit as well. It's a good text editor for code and random text. It's a nice middle ground between Notepad and Eclipse.
If you want something just a step above Notepad for quick, efficient editing I would recommend Notepad2. It's really useful when you replace the standard Notepad with this version. You continue to have a fast startup but the syntax highlighting is a real boon. I replace Notepad with Notepad2 on every one of my Windows machines.
I use SciTE
I'm a massive fan of Notepad2 - it is so quick!
For quick simple editing of text for me it's close to perfect. It has syntax colouring for Xml and code and can be extended easily.
We use Dreamweaver and Visual Studio for larger coding efforts.
UltraEdit is my second home. It is a great general purpose text editor.
Textpad is what I would use for random text editing (checking out HTML source, quick hackery, scripts and the like).
For actual Java development it's Eclipse all the way, although people tell me the IDEA is the cat's pyjamas.
E-TextEditor
Is a bit buggy, but beats the pants off any other editors I've used due to it's using the Textmate bundle format (and the bundles) - also gets updated very regularly. I use it every day and would gladly purchase it again.
Note that I primarily work in C/C++. For C/C++ code, I use Visual C++ Express Edition or Visual Studio Professional. For the little bit of Python I'm learning, I use the editor in the PythonWin IDE. (Mostly because it does a bit of code completion.) For everything else, I use GViM.
Tip:
After you install ViM on Windows, if you right-click on any file in Explorer, you see the Edit with Vim option in the right-click menu. This is very useful for peeking into and editing every kind of text file without having to bother about specific editors. GViM can understand most formats and thus displays them with syntax coloring. Get used to doing this and soon GViM becomes your defacto generic text editor on Windows. (Even replacing Notepad.)
Thej already recommended it, but to elaborate:
SciTE - Free, has preset colouring for many languages, and it's multi-platform (Windows & Linux), and lightweight.
alt text http://scitedebug.luaforge.net/scite-debug.png
gvim. I also use Dreamweaver for web stuff.
Notepad2
Syntax highlighting for html,c#,javascript,css,xml,sql,python,bat
Rectangular selection, regular expressions
Indentation, back/foreground customization
Downside: No tabbed windows.
I'll echo the others who have endorsed Emacs. I program every day on, at a bare minimum, OS X, Windows, and Linux. Having the same IDE on all three systems gives me an enormous productivity boost. That said, the vanilla version of GNU Emacs...well, it sucks. I'd strongly encourage you to try EmacsW32 instead. In much the way that Aquamacs makes an OS X-friendly version of Emacs, the EmacsW32 project makes Emacs out-of-the-box work just like a Windows text editor. Mind you, all of Emacs' power (and complexity) is there, but if you don't already have muscle memory built up, there's no reason not to use Ctrl-C/X/V as copy/cut/paste instead of M-w/C-k/C-y just to be cool. EmacsW32 also brings Windows-compliant open/save dialogs, sane CRLF file handling, and quite a bit more. If you've ever had an itch to try Emacs, give it a shot. You won't regret it.
Not everybody uses Notepad++, it's not that good.
Crimson Editor
http://www.crimsoneditor.com/images/overview.gif
EditPlus is my editor of choice. All the features you'd need, and no more.
I know this is my own question but I came across this text editor Sublime Text and thought it was pretty sweet. There are a few features in it that i have never seen before. It has multiple line select ( lines that are not continuous ) and a birds eye view navigation. It's a little pricey but I am having fun playing with the free version.
I use EDIT.COM for a lot of things, believe it or not. Old habits die hard.
Commercial product (Windows): UltraEdit.
Freeware (Windows): Notepad++, PSPad.
Cross-Platform: JEdit. It's written in Java and runs on almost anything.
If you don't mind taking a performance hit under Windows, JEdit has some amazing capabilities. For native performance on that platform, I would go with one of the others. I tend to switch back and forth between Notepad++ and PSPad. Notepad++ probably edges it out for most tasks. It has section folding, which is very handy. However, you did ask about products other than that one.
I have used UltraEdit for years... If I'm working on a project I prefer to use a real IDE, but nothing beats it for quickly making changes to source files, or especially for those small PHP projects where you're just hacking away anyway. The killer feature for me is the compare functionality.
I personally like ConTEXT.
A lot of people gave their suggestions for favourite text editor here:
https://stackoverflow.com/questions/10238/text-editor-or-ide#10391
I strictly use jEdit.
My personal favorite is EditPad Pro. Not because it is superior in any way, but because it was the one I started to use.
UltraEdit it my favorite text editor. Too bad I have to pay for it. You can't beat the ability to highlight vertically vs. horizontally.
Textpad replaces notepad for me. I couldn't live without it. Some key features that I use with Textpad are:
Find in files (along with open all, replace all, save all, close all).
Block Select (along with copy/paste of a column).
Clip Library
Syntax highlighting
Ability to attach externals tools (compilers, etc.) and capture the output to a window.
I use Eclipse for Java, Visual Studio for C++, C#, and VB.NET, JellyFish Pro for PowerBasic, I still use Visual Studio 6 for Classic VB, and I use TextPad for perl, python, Powershell, vbscript, SQL, HTML, and batch files.
I hate to sound like a broken record, but Vim is my choice. It works the same way everywhere and you'd be hard pressed to find a more powerful editor.
I don't code much on Windows, but e text editor is my choice. As far as free editors go nothing beats Emacs.
Notepad2, apart from Notepad++
Visual Studio, notepad2, notepad++.
Visual Studio for .Net development. Currently working with VS2008, but seems to be not quite finished yet. 2005 is probably the most stable and complete. Anything else for that would seem quite futile for .Net development
I use e-TextEditor for most other things. It covers most of the topics above including syntax highlighting, multi-select/edit, column select, TextMate bundles for auto-complete.
As you can see, asking about a preferred editor will get you a lot of responses. For me: UltraEdit - robust:
Notepad++ - lightweight
Also tend to use the IDE that comes with various tools (e.g. VB, C#, etc.)
But, the best advice is to pick a decent editor and learn it thoroughly. You will be spending a whole lot of time using it. So, the better you know it, the more time it will save you in the long run.

Resources