dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

keybinds.lua (1237B)


      1 local snippets = require('snippets')
      2 
      3 local change_scale_factor = function(delta)
      4 	vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
      5 end
      6 
      7 -- General Editor binds
      8 vim.keymap.set('n', '<M-j>', '}')
      9 vim.keymap.set('n', '<M-k>', '{')
     10 vim.keymap.set('v', '<M-j>', '}')
     11 vim.keymap.set('v', '<M-k>', '{')
     12 vim.keymap.set('i', '<C-k>', snippets.expand_or_advance)
     13 vim.keymap.set('n', '<leader>e', '<CMD>Lexplore<CR>')
     14 
     15 -- Compilation bind
     16 vim.keymap.set('n', '<leader>c', '<CMD>make<CR>')
     17 vim.keymap.set('n', '<M-n>', '<CMD>cn<CR>')
     18 vim.keymap.set('n', '<M-p>', '<CMD>cp<CR>')
     19 vim.keymap.set('n', '<M-l>', '<CMD>cl<CR>')
     20 
     21 -- Buffer binds
     22 vim.keymap.set('n', '<leader>bp', '<CMD>bn<CR>')
     23 vim.keymap.set('n', '<leader>bn', '<CMD>bp<CR>')
     24 
     25 -- Window binds
     26 vim.keymap.set('n', '<leader>ww', '<C-w>w')
     27 vim.keymap.set('n', '<leader>wn', '<C-w>n')
     28 vim.keymap.set('n', '<leader>wv', '<C-w>v')
     29 vim.keymap.set('n', '<leader>wm', '<CMD>only<CR>')
     30 vim.keymap.set('n', '<M-o>', '<C-w>w')
     31 vim.keymap.set('n', '<leader>wc', '<CMD>close<CR>')
     32 
     33 vim.keymap.set('n', '<C-j>', '<CMD>move .+1<CR>')
     34 vim.keymap.set('n', '<C-k>', '<CMD>move .-2<CR>')
     35 vim.keymap.set('v', '<C-j>', ":move '>+1<CR>gv=gv")
     36 vim.keymap.set('v', '<C-k>', ":move '<-2<CR>gv=gv")