55 Matching Annotations
  1. Mar 2021
    1. It does this by creating links to specially crafted URLs using custom schemes (ie. "txmt", "subl", "mvim"). I prefer to use standard CLI vim in iTerm.

      I have similar problem: want to use regular vim in tilix terminal

    1. vim-athena doesn't depend on or use any version of GTK+. If you use sudo apt-get build-dep vim-athena, it probably will install GTK+ and GNOME related libraries, because the vim-athena binary package is built from the same source package as vim and other vim-providing packages. In any case, you shouldn't need to build from source, as the binaries provided by vim-athena are already built against Athena and not against GTK+ or other graphical toolkits.
    2. Fortunately, vim officially supports some GUI's other than GTK+ and Qt, and one such build is officially packaged for Ubuntu. Just install the Athena version of vim, which is provided by the vim-athena package.
    3. If you built vim against Qt rather than GTK+ and python-complete still isn't working, that suggests the problem isn't actually a consequence of trying to link to both GTK+2 and GTK+3.
    4. How can I build vim with a gui without gtk?

      I had this question too, but didn't know that was the question I had... :)

    1. and the --enable-gui=<gui> e.g. (--enable-gui=gnome for the Gnome Gui).
    2. How to install VIM with all options/features? - VIM
    3. If you want to compile youself you can pass the --with-features=huge to the configure script. Note, however, this does not enable the different language bindings because those are mostly optional and also the various GUIs need to enabled specifically, because you can have only one gui.

      This explains why the standard vim package on ubuntu doesn't have GUI support (I was going to say because it wouldn't know which GUI you needed, but I think it would based on the Ubuntu variant: GNOME, KDE, etc.) (maybe because it wouldn't know whether you wanted GUI support at all)

      I was going to say because it wouldn't know which GUI you needed, but I think it would based on the Ubuntu variant: GNOME, KDE, etc.

      found answer to that: https://hyp.is/NyJRxIgqEeuNmWuaScborw/askubuntu.com/questions/345593/how-to-build-vim-with-gui-option-from-sources

      so you have to install a different package with GUI support, like vim-gtk or vim-athena

    1. vim-athena

      Importantly, to me, you can do this:

      /usr/bin/vim.athena --servername local
      
    2. Including the vim package, there appear to be at least six "vim-variants" (not including available documentation, or plugin packages) as well as the main vim package in both the main and universe repositories.
    1. If you call ./configure --enable-gui=auto, the build process will automatically build against whichever GUI libraries are available. A cursory glance suggests that gtk2 will be prioritised over gnome2.
    1. Some research led me to the --remote-tab switch that allows to open files as tabs in currently open Vim processes but it seemed to work only with the graphical interface (gvim) and not with the console (vim). But as I made some tests I found this can work with the vim in console mode

      That's what I thought too (that it was only available with gvim, which I don't want to use).

      But I get this error when I try it with regular vim:

      $ vim --servername local
      VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
      Unknown option argument: "--servername"
      
    2. When programming I like to have a single Vim editor open with all my files as tabs. Until now I was using the ":tabnew" command to open files in the current Vim window as I knew no other way.
    3. All I needed to do was configure my bash so it will always start vim in server mode if it is not already and to always use the --remote-tab switch when opening files.
    1. I don't use remote editing much so vim-dirvish is powerful enough to manage my workflow (It's actually faster than netrw ~ the author claims 2x, I feel it's faster than that - it's really instantaneous ⚡) very useful on large codebase/repositories
    2. I was searching for a solution to this problem too since I actually removed netrw from being loaded in vim completely and replace it with vim-dirvish. This plugin has around 500~ LOC, compared to netrw's (11,000+ LOC).
  2. Jan 2021
  3. Dec 2020
    1. Note that unlike most programs which maintain a linear undo history, Vim maintains an undo tree containing every edit made to a buffer.
  4. Oct 2020
    1. WP and Enter on an AT keyboard does not make the Word perfect, but this simple writing act starts the actual execution of Wordperfect

      La condensation des commandes à quelques lettres permet théoriquement d’aller plus vite.

      C’est ainsi que fonctionne d’ailleurs Vim, un éditeur de texte en ligne de commande encore très utilisé aujourd’hui.

      • w : se déplacer d’un mot (Word)
      • 2w : se déplacer de 2 mots
      • :reg : afficher le registre des copier-coller
      • :wq : commande pour sauvegarder (Write) et quitter (Quit)

      capture d’écran VIM

  5. Sep 2020
  6. Aug 2020
  7. Jul 2020
  8. Jun 2020
    1. Basic Install environment.systemPackages = with pkgs; [ vim ]; or environment.systemPackages = with pkgs; [ vim_configurable ];

      What is the difference between the vim and vim_configurable packages?

      I believe the source for the latter is here.

  9. May 2020
  10. Apr 2020
  11. Mar 2020
    1. I wrote a plugin for Vim that lets you easily toggle a YML file between nested format: xx.yml1 2 3 4 en: baz: "baize" foo: bar: "baare" and a flat format: xx.yml1 2 en.baz: "baize" en.foo.bar: "baare" This is really useful, as the flat format is easier to search and edit.
  12. Feb 2020
  13. Dec 2019
    1. Vim does not only offer unlimited undo levels, later releases support an undo tree. It eventually gives the editor VCS-like features.
  14. Nov 2019
  15. Mar 2019
    1. 创建vim session文件 :mks filename, 重写session :mks! filename,  载入session vim -S sessionFile

      该命令可以将当前Vim打开的窗口以文件的方式进行保存,当下次打开时直接以保存时的状态打开

      保存当前会话session: :mks filename

      更新当前会话session: :mks! filename

      载入会话session: vim -S sessionFile

  16. Dec 2017
  17. Sep 2017
    1. up vote 15 down vote This is one of the few reasons I like to use vim's mouse mode. If you use the GUI version, or your terminal supports sending drag events (such as xterm or rxvt-unicode) you can click on the split line and drag to resize the window exactly where you want, without a lot of guess work using the ctrl-w plus,minus,less,greater combinations. In terminal versions, you have to set mouse mode properly for this to work :set mouse=n (I use 'n', but 'a' also works) and you have to set the tty mouse type :set ttymouse=xterm2 A lot of people say that a lot of time is wasted using the mouse (mostly due to the time it takes to move your hand from the keyboard to the mouse and back), but I find that, in this case, the time saved by having immediate feedback while adjusting window sized and the quickness of re-resizing (keep movving the mouse instead of typing another key sequence) outweighs the delay of moingmy hand.

      Simply amazing setup to get multiple screens vim

  18. Aug 2017
  19. Jan 2016
  20. Aug 2015
    1. I have had an annoying problem with git and vi. I like to use vim to edit my commit messages, but I’ve been hit with this annoying message every time I write the message and quit vim.

      Thanks for this. I encountered the same issue with OS X 10.10.

      Haven't investigated the issue fully yet but there is definitely a difference in the exit status behavior when launching vim as 'vi' vs. launching it as 'vim'

  21. Jun 2015
    1. Simply: require('child_process').spawn('vim', ['test.txt'], {stdio: 'inherit'}); If there is nothing left in the Node.js event loop when vim exits, then node will exit automatically as well. Or, if you need to guarantee node will exit when vim does: var vim = require('child_process').spawn('vim', ['test.txt'], {stdio: 'inherit'}); vim.on('exit', process.exit); As for closing the node application before vim exits, that's not really possible because vim inherits standard input/output/error streams from the spawning process (node) which are destroyed when node exits.
  22. May 2015
    1. Time Travelling Without Worries But here's the best part - knowing the true nature of history, we can combo it with another cool feature of Vim - persistent undo - to be able to travel in time there and back without fear of losing anything! In other words, if you do: mkdir -p ~/.vim/undodir and then add: set undofile set undodir=~/.vim/undodir to your ~/.vimrc, you get a file-backed infinite undo. And even if you undo like a madman and then edit something, you will not lose your way back to where you’ve been. Which is pretty much a developer’s (or anyone’s, really) text-editing nirvana. Enhance you calm and enjoy a bit saner coding.
    1. Save Work On Focus Lost This feature works best in combo with infinite undo. The idea here is that everytime you leave your Vim window, all your open files are automatically saved. I find this to be extremely helpful, for example when I’m working on a laptop and continuously run unit tests in terminal. My laptop is 13'' so I prefer to run Vim full screen and with this feature, I don’t have to explicitly save my source code file; I just cmd+tab to the terminal, Vim saves the file for me and my unit tests watcher re-runs the suite. If you save unwanted changes by accident you can easily remedy that with undo. To turn autosaving on, add: :au FocusLost * silent! wa to your .vimrc. The silent! flag prevents Vim from complaining when you have open unititled buffers (see this article for details).
  23. Mar 2015
    1. A Vim plugin for visually displaying indent levels in code

      Great Vim plugin!

      vim-indent-guides plugin screenshot

  24. Jan 2015
    1. A search reference /{string}: search for string t: jump up to a character f: jump onto a character *: search for other instances of the word under your cursor n: go to the next instance when you’ve searched for a string N: go to the previous instance when you’ve searched for a string ;: go to the next instance when you’ve jumped to a character ,: go to the previous instance when you’ve jumped to a character

      A Search Reference