Debugging scheme on vim - vim

We are working on a project with scheme on UNIX terminal using vim.
We are using mzscheme (though startup prompt says Welcome to Racket v6.1.
Is there any way we can use vim to debug the program?
I tried using Dr.Racket with the following libraries:
#lang racket
#lang scheme
#lang r5rs
but I wasn't even able to run the program so we are thinking of just doing it in vim.
I appreciate all of your suggestion

Maybe that gist might help.
But be aware that actually the vim vs emacs war found an end in spacemacs - we have just to use it and declare an end to this useless meaningless war. spacemacs is an under-the-hood-emacs but presenting itself with vim keybindings.
So this means you can use emacs (a very able lisp editor written in a lisp) to parse lisp code (be it Racket or be it emacs lisp or be it common lisp) using your beloved vim key bindings - and the interactive behaviour of vim.
(emacs is actually an operating system in your operating system. You can make it even open pdf files! I was so amazed when I saw it the first time).
You might give it a shot!
The advantage of this is that emacs is a code-aware editor for lisp code.
Maybe that link will help.

Related

Can you just use vim scripts and plugins with emacs' evil mode? what are evil mode's limitations?

What the title says.
Thinking about starting to use emacs, have some experience in vim now and a decent setup with vim plugins
No, evil is still based around Emacs Lisp. There is no attempt to implement a vimscript interpreter, and evil doesn't turn Emacs into vim -- it's still Emacs... just an Emacs with lots of vim features.

Linux text editor: Pretty. Fast. Powerful. Easy to pick up

Looking for a linux text editor. I can fumble my way through emacs a little but only really know the basics. I liked TextMate on OSX but thought it was a bit weak at times (maybe I just didn't learn it well enough). I don't know if emacs or vim are worth it since I'll still mostly program in eclipse.
Syntax highlighting
Themeing support. I'd like something like sunburst if possible.
Hopefully don't have to think in a different way when I use it versus other programs. i.e. I don't think I want to learn all the shortcuts for emacs/vi. (If I were to be sold on this route I'd need something to help me get up to speed quickly and hopefully something in app that helps discover functionality as I go). Cream might be a go here but I don't know what I'm missing if I do that.
Mouse usage (text selection, cursor placement, etc)
doesn't look awful (yes aesthetics do matter to me).
Auto-formatting support
Light-weight
Easily callable from the command line.
Depends on the task at hand.
I've been using Geany to write scripts, it has basic IDE functions, good syntax highlighting etc.
+1 for vim. The learning curve can be a bit steep, but vimtutor can help you a lot.
Once you get accustomed to it you'll wonder how you lived without it.
gEdit. Has a bunch of plugins and has support for vi bindings. I think it meets all of your requirements.
+1 for Vim - it's my all time favorite editor and the more I learn about the shortcuts and use more plugins and stuff, I would never go to another editor :) Although in my spare time I have started dabbling with Emacs, just for the kicks. Vim essentially has two modes - normal and insert, so you switch back and forth between them. In the insert mode you type, in the normal mode you do magic with the shortcuts. The power is awesome and after a while it becomes intuitive, and you start finding that you just did a keyboard combination and it worked as you expected, although you never specifically read about this combination. E.g. delete till the character 'x' before the current position of the cursor = Esc+d+T+x (when you only knew that Esc+d+t+x (small t) works in the forward mode.
Simpler ones on Linux are nano, pico, and gEdit :)
I recommend Komodo Edit for big projects. It's possible to create macros, key-bindings for commands and snippets through an easy-to-use interface. And there's a good syntax highlight support for most languages too.
A second choice would be geany. It's faster and simple, useful for the most cases where you just want to edit a single file or a small project.
If you wish to learn vim or emacs, then print yourself the vim or emacs quick reference card.
In fact, I'd recommend learning vim or emacs even if you wind up mostly using a more modern editor simply because they exist when nothing else does.
I personally prefer vim because many vim commands match sed and perl commands, definitely consider vim if you use these often. And you should obviously pick emacs if you like lisp.
There was an issue with bash's vi mode in which it ignored the arrow keys for ages, which forced people into using vim for editing and emacs mode in bash, but now set -o vi works correctly in bash.

Can you tell me the relationships and differences between Vi and Vim

I often see Vim in my lab, but I also know Vi, but I never have a chance to use it, I search for it by using google, but I can't get a website to download Vi. Can you show me the relationships and differences between Vi and Vim, if possible, give me a url to download the Vi. Thanks!
Despite what others have said, Vim is not an enhanced version of Vi, nor is it an extension. It might seem that way because Vim was designed to be, by default, as compatible with Vi as possible (even more so in Vi-compatible mode). Obtaining Vi source code used to required a Unix source code license, and since additional features were desired, Vim was developed independently of Vi. It is more properly called a clone, which has additional features.
Vim is the standard editor on many *nix systems. The "program" vi is often just a symlink to vim. Historical interests aside, I can't think of a compelling argument for using Vi. Vim is much more modern, and any features you don't want can be disabled, or support for them not compiled in.
You can download the source for vi here: http://ex-vi.sourceforge.net/
Vim is an enhanced version of Vi with extra features. If you know how to use Vi, you won't have trouble using Vim, since you know the basics. Sometimes people used to Vim have trouble with Vi as it doesn't have all the extra features as Vim.
Vim has an option called compatible that makes vim behave nearly exactly like vi. See :help 'compatible for more information.
VIM is Vi iMproved. VIM is basically an extension of Vi. I would learn VIM not Vi as it just gets too hard for many things. The advantage is if you can use Vim you can use Vi, just the extra snazzy stuff like syntax highlighting etc will be missing.
See wikipedia for more details on the history of the two: http://en.wikipedia.org/wiki/Vi & http://en.wikipedia.org/wiki/Vim_(text_editor)
Here is a good guide to Vi including how to install for your distro: http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html

Programming Scheme(Racket) with VIM - How to get started

recently, I started programming Racket (formerly Scheme) in DrRacket.
I quite fast I began to miss all the features of VIM in DrRacket, so I would like
to use VIM for my scheme(racket) programming.
I know that Emacs might be the best choice for intense lisp programming, but all
I want is write a scheme(racket) file check syntax and then run it.
Unfortunately, I could not figure out, how to invoke "racket" in the commandline
on a file to get it doing the same as DrRacket.
I am running Ubuntu 10.10 Maverick Meerkat, VIM 7.3 and I downloaded and
installed Racket from the official website.
Help to get started would be very appreciated.
If you just want to load a file into Racket on the command-line and run it, I think that this should work:
$ racket -f file.scm -i
The -i option would leave you at the REPL to test your code in file.scm.
However, you might want to take a look at this blog post:
http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/
You can set up a GNU screen session running the command-line Racket, and send s-expressions to it from Vim. There's a link to a bit of Vimscript which will make this automatic. I used this for a while with mit-scheme, and it was reasonably effective. It's not quite the as powerful as SLIME or DrRacket though. I just tested the steps described on OS X and it works with the command-line racket, it should work on Ubuntu, that's what I was using when I first used this method.
You might also want to take a look at this:
http://evalwhen.com/scmindent/index.html
... which has some information on better indentation in Vim for Lisp and Scheme code.
I eventually switched to Emacs, but don't let the Vim haters get you down. Paul Graham supposedly uses vi and he's gotta be one of the top 5 most prominent Lisp programmers.
http://paul.graham.usesthis.com/
Several add-ons are available to make coding in Racket more satisfying with Vim.
Vim’s lisp mode (set lisp) -- improves some basics for indenting and w/e/b word-hopping.
vim-racket -- sizable set of vim-syntax recognition for functions and syntax
syntastic -- identify errors upon save (vim-racket sets makeprg for this to work)
Rainbow Parentheses -- set your own paren colors for maximal contrast!
vim-slime -- use with Tmux to connect Vim to a Racket REPL
surround -- wrap forms and elements in parens
vim-sexp for normal people
Molokai color scheme -- high contrast
VROD* -- K-based Vim documenation, and auto-completion of Racket functions
REPTL* -- very simple continuous rackunit test runner
I prefer slime over slimv for its simplicity.
If you are using Vundle, here is a way to install most of the add-ons mentioned:
Plugin 'tpope/vim-surround.git'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'scrooloose/syntastic.git'
Plugin 'MicahElliott/vrod'
Plugin 'guns/vim-sexp'
Plugin 'tpope/vim-sexp-mappings-for-regular-people'
Plugin 'wlangstroth/vim-racket'
Plugin 'tomasr/molokai.git'
Put those into your ~/.vimrc, and then invoke to install:
% vim +PluginInstall +qall
Here is a screenshot showing off most of these:
(* disclosure: I wrote VROD and REPTL, and they are immature)
Also, here is a related blog post describing a Vim/SICP setup.
As of about a week ago, SLIMV (SLIME for Vim) supports Racket. SLIMV is generally regarded as the most mature Lisp environment for Vim at the moment.

IDE / Emacs mode for Shell scripting in Bash/Sh, etc

I use Emacs for shell scripts. I know I read somewhere there's some mode to make it easier (code completion, autocomplete, bracket matching, syntax highligting, check syntax) to write Shell scripts on Emacs but haven't been able to find it. In short, I would like to turn Emacs into a Bash IDE.
Also, is there any other tool/IDE to make scripting easier on the GNU/Linux Shell?
Well, there's a built-in shell mode that does syntax highlighting, if it's not already turned on, M-x shell-script-mode will do it for you.
Regarding a tool to make scripting easier. There's a bash shell debugger, so if you program in bash, that would help quite a bit.
Of course there's eshell, a shell written in Emacs lisp, so you can get all the syntax highlighting you'd expect from lisp, the auto-completion, and the emacs lisp debugger.
I don't think there is any mode for code completion for shell-scripts, at least not in Emacs. (I've actually never felt the need.) However, there is support in bash for completion when running interactively (the package is called "bash-completion", or something similar). This provides tab-completion for many shell-commands.
Another IDE for the VIM world:
Plugin bash-support.vim
screen shots
Help file on-line
I know it is old post, but i will like to share my settings.
I had the same issue and now I use the code below in my .emacs file for sh/bash code autocompletion.
(require 'auto-complete)
(require 'auto-complete-config)
(ac-config-default)
The syntax highlighting should already work if you use a recent version of Emacs.
Griffon is an IDE specifically designed for BASH scripting. Its features include autocomplete, syntax highlighting, error detection, and more.
I am not very familiar to Emacs, but I believe it's not convenient. As I see, good ide always can do:
Jump to declaration
Find references
Code Outline & Show Symbols
Highlight occurrences
Code completion
So I will recommend Jetbrain Idea(with bashsupport plugin) and Visual Studio Code(with bash ide and shell-format extension).
ps:
bashsupport - https://plugins.jetbrains.com/plugin/4230-bashsupport/
bash ide - https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode

Resources