From 8a255002df1f6d02ef7ca9503be1a7d7234acef8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 11 Nov 2013 01:34:19 +0100 Subject: [PATCH] Update csv and rust --- ftplugin/csv.vim | 17 +++++++++-------- syntax/rust.vim | 4 ++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ftplugin/csv.vim b/ftplugin/csv.vim index 992b86a..1ba2772 100644 --- a/ftplugin/csv.vim +++ b/ftplugin/csv.vim @@ -1766,8 +1766,7 @@ fu! MoveOver(outer) "{{{3 let mode = 1 endif endif - " Use the mapped key - exe ":sil! norm E" + call MoveCol(-1, line(".")) let _s = @/ if last exe "sil! norm! /" . b:col . "\v$h" . (mode ? "" : "\") @@ -1779,11 +1778,19 @@ endfu fu! CSVMappings() "{{{3 call Map('noremap', 'W', ':call MoveCol(1, line("."))') + call Map('noremap', '', ':call MoveCol(1, line("."))') + call Map('noremap', 'L', ':call MoveCol(1, line("."))') call Map('noremap', 'E', ':call MoveCol(-1, line("."))') + call Map('noremap', '', ':call MoveCol(-1, line("."))') + call Map('noremap', 'H', ':call MoveCol(-1, line("."))') call Map('noremap', 'K', ':call MoveCol(0, \ line(".")-v:count1)') + call Map('noremap', '', ':call MoveCol(0, + \ line(".")-v:count1)') call Map('noremap', 'J', ':call MoveCol(0, \ line(".")+v:count1)') + call Map('noremap', '', ':call MoveCol(0, + \ line(".")+v:count1)') call Map('nnoremap', '', ':call PrepareFolding(1, \ 1)') call Map('nnoremap', '', ':call PrepareFolding(1, @@ -1806,12 +1813,6 @@ fu! CSVMappings() "{{{3 call Map('nnoremap', '', '') call Map('nnoremap', '', '') call Map('nnoremap', '', '') - call Map('map', '', 'W') - call Map('map', '', 'E') - call Map('map', 'H', 'E') - call Map('map', 'L', 'W') - call Map('map', '', 'K') - call Map('map', '', 'J') endfu fu! CommandDefinitions() "{{{3 diff --git a/syntax/rust.vim b/syntax/rust.vim index a0a2392..e5ff089 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -161,6 +161,9 @@ syn match rustNumber display "\<[0-9][0-9_]*\(i\|i8\|i16\|i32\|i64\)\>" syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\>" syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\(u\|u8\|u16\|u32\|u64\)\>" syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\(i8\|i16\|i32\|i64\)\>" +syn match rustOctNumber display "\<0o[0-7_]\+\>" +syn match rustOctNumber display "\<0o[0-7_]\+\(u\|u8\|u16\|u32\|u64\)\>" +syn match rustOctNumber display "\<0o[0-7_]\+\(i8\|i16\|i32\|i64\)\>" syn match rustBinNumber display "\<0b[01_]\+\>" syn match rustBinNumber display "\<0b[01_]\+\(u\|u8\|u16\|u32\|u64\)\>" syn match rustBinNumber display "\<0b[01_]\+\(i8\|i16\|i32\|i64\)\>" @@ -198,6 +201,7 @@ syn region rustFoldBraces start="{" end="}" transparent fold " Default highlighting {{{1 hi def link rustHexNumber rustNumber +hi def link rustOctNumber rustNumber hi def link rustBinNumber rustNumber hi def link rustIdentifierPrime rustIdentifier hi def link rustTrait rustType