5 ms·
Isn't it the same use case as having say SQL Server Management Studio? You get nice syntax highlighting and your Vim dev environment for modifying SQL then you
by icc97 9y ago
Isn't it the same use case as having say SQL Server Management Studio? You get nice syntax highlighting and your Vim dev environment for modifying SQL then you can run the script and see the result and edit, rinse, repeat
- falcolas 9y agoI can do exactly what you mention with two terminal windows, swapping back and forth with a single key combination. As a bonus, it lets me take advantage of keeping my connection credentials out of a history file. My response is based largely on my workflow - I use VIM as one part of my development environment (ie the shell), not as a standalone IDE. Perhaps this is the biggest difference.
- petepete 9y agoI use tmux for this, often with a horizontal split displaying the output of the script on the bottom and the query/ddl on top (just like isqlw). I know it's possible to automate further (to make vim talk to tmux and execute the bit of SQL under the cursor, for example), but it works well for me as is.
- WhatIsDukkha 9y agoAs I got better over with Vim I wanted more and more things under the editing and movement power of Vim Text Objects - https://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/ https://blog.carbonfive.com/2011/10/17/vim-text-objects-the-... That's probably why I ended up with Emacs/Evil mode :) https://www.emacswiki.org/emacs/SqlMode https://www.emacswiki.org/emacs/SqlMode For me SQL is editing and sending chunks of text fluently, that exactly where vim or emacs are at their best.
- fiddlerwoaroof 9y agoYeah, the best implementation of vi is written in Emacs Lisp
- hsitz 9y agoThat sounds like someone who never fully committed to Vim. Yes, Evil is excellent. I've mostly switched to using Emacs because of it, and Org-mode. But I still can't quite get past the feeling that Emacs is a clunky sedan and Vim is a sleek sports car. Vim just feels a little bit nicer, faster, smoother.
- fiddlerwoaroof 9y agoI was all in on vim for about ten years and then, when I started getting into Common Lisp, I would use emacs from time to time because slime is better than the vim equivalents and I eventually realized (a) evil-mode is an amazingly faithful implementation of a fairly comprehensive portion of vim’s features and (b) that you could program emacs in a language that wasn’t pathological.
- freshhawk 9y agoI'm with you, but it isn't hard for me to remember when I didn't realize that's what I wanted and was really really good at the whole tmux/copy-pasting between terminal windows dance. I think you need to see a screencast to understand why this approach is such an improvement, for some reason it is hard to grasp at first.
- garyclarke27 9y agoI agree a powerful text editor is essential for me to write SQl code. I use Sublime Text as my Postgres Editor (easy with it’s build tool) ST3 is in a different league to flaky clunky slow PGadmin or Postico or SQLPro or Navicat etc (I’ve ried them all). Beautiful Themes Postgres specific plugin for SQL highlighting, amazing text find & replace & manipulation, instant feedback, all the power of PSQL but in a much nicer environment, lightning speed, never crashes even if you bring back a few millions rows.