37 Matching Annotations
  1. Jan 2021
  2. 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.
  3. 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

  4. Sep 2020
  5. Aug 2020
  6. Jul 2020
  7. 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.

  8. May 2020
  9. Apr 2020
  10. 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.
  11. Feb 2020
  12. 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.
  13. Nov 2019
  14. Mar 2019
    1. 创建vim session文件 :mks filename, 重写session :mks! filename,  载入session vim -S sessionFile


      保存当前会话session: :mks filename

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

      载入会话session: vim -S sessionFile

  15. Dec 2017
  16. 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

  17. Aug 2017
  18. Jan 2016
  19. 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'

  20. 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.
  21. 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).
  22. Mar 2015
    1. A Vim plugin for visually displaying indent levels in code

      Great Vim plugin!

      vim-indent-guides plugin screenshot

  23. 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