Skip to content

Instantly share code, notes, and snippets.

@scajanus
Created June 19, 2016 08:46
Show Gist options
  • Select an option

  • Save scajanus/ab18f82a84c0abb8b4e095b6def6e917 to your computer and use it in GitHub Desktop.

Select an option

Save scajanus/ab18f82a84c0abb8b4e095b6def6e917 to your computer and use it in GitHub Desktop.
Looping over characters for a mapping
for i in range(65,90)
exec 'inoremap <expr> ' . nr2char(i) . ' col(".")<20 ? ' . '"" : "' . nr2char(i) . '""'
endfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment