diff --git a/autoload/csv.vim b/autoload/csv.vim index b4258e2..6f545a3 100644 --- a/autoload/csv.vim +++ b/autoload/csv.vim @@ -2345,6 +2345,7 @@ endfu fu! csv#Map(map, name, definition, ...) "{{{3 let keyname = substitute(a:name, '[<>]', '', 'g') + let keyname = substitute(a:name, '-', '_', 'g') let expr = (exists("a:1") && a:1 == 'expr' ? '' : '') if !get(g:, "csv_nomap_". tolower(keyname), 0) " All mappings are buffer local diff --git a/doc/ft-csv.txt b/doc/ft-csv.txt index df9b52d..b26970f 100644 --- a/doc/ft-csv.txt +++ b/doc/ft-csv.txt @@ -614,9 +614,11 @@ is equival to a single backslash '\', e.g. \K would run the lookup function on the word under the cursor and \J would join this line with the previous line. If you want to prevent the mapping of keys, simply set the global variable -g:csv_nomap_ to 1, e.g. to prevent mapping of in csv files, put > +g:csv_nomap_ to 1, (remove the special characters `<>` and replace `-` by +`_`), e.g. to prevent mapping of and in csv files, put > let g:csv_nomap_cr = 1 + let g:csv_nomap_c_left = 1 < into your |.vimrc|. Note, the keyname must be lower case.