Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
812 B

  1. local map = vim.api.nvim_set_keymap
  2. local opts = {noremap = true}
  3. -- [,w] SAVE
  4. map('', '<Leader>w', ':update<CR>', opts)
  5. -- <VISUAL> [Q] REFORMAT TEXT
  6. map('v', 'Q', 'gq', opts)
  7. -- Clipboard Bindings, Prefixing with leader copies to global
  8. map('n', '<Leader>y', '"+y', opts)
  9. map('n', '<Leader>p', '"+p', opts)
  10. map('v', '<Leader>y', '"+y', opts)
  11. map('v', '<Leader>p', '"+p', opts)
  12. map('n', '<Leader>Y', '"+Y', opts)
  13. map('n', '<Leader>P', '"+P', opts)
  14. map('v', '<Leader>d', '"+d', opts)
  15. map('n', '<Leader>D', '"+D', opts)
  16. -- Find and replace with Ctrl-R
  17. map('v', '<C-r>', '"hy:%s/<C-r>h//g<left><left><left>', opts)
  18. -- Apply . to all selected lines
  19. map('v', '.', ':normal .<CR>', opts)
  20. -- Quit window
  21. map('', '<Leader>qb', ':q<CR>', opts)
  22. -- Quit all without saving
  23. map('', '<Leader>qq', ':qa!<CR>', opts)