local remap = vim.keymap.set
local opts  = { noremap=true, silent=true, unique=true }

require'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }

remap('n', 'g/', ':HopPattern<CR>'  , opts)
remap('n', 'gl', ':HopLineStart<CR>', opts)
remap('n', 'gL', ':HopLine<CR>'     , opts)

remap('n', 's' , "<cmd>lua require'hop'.hint_char2()<CR>", opts)
remap('x', 's' , "<cmd>lua require'hop'.hint_char2()<CR>", opts)
remap('o', 's' , "<cmd>lua require'hop'.hint_char2()<CR>", opts)

remap('n', ',s' , "<cmd>lua require'hop'.hint_words()<CR>", opts)
remap('x', ',s' , "<cmd>lua require'hop'.hint_words()<CR>", opts)
remap('o', ',s' , "<cmd>lua require'hop'.hint_words()<CR>", opts)

remap('n', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true})<CR>" , opts)
remap('n', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true})<CR>", opts)
remap('x', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true})<CR>" , opts)
remap('x', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true})<CR>", opts)
remap('o', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true})<CR>" , opts)
remap('o', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true})<CR>", opts)
