Merge branch 'master' of github.com:adamlsd/cshenv
Conflicts: vim/after/syntax/cpp.vim
This commit is contained in:
@ -59,7 +59,7 @@ syn keyword cxxStlKeywords contained containedin=cxxAttribute noreturn carries_d
|
||||
syn keyword cxxStlKeywords contained containedin=cxxStlLibrary,cxxBoostLibrary mutex condition_variable condition_variable_any thread lock_guard scoped_lock unique_lock
|
||||
|
||||
" Strings
|
||||
syn keyword cxxStlKeywords containedin=cxxStlLibrary string contained
|
||||
syn keyword cxxStlKeywords containedin=cxxStlLibrary wstring string contained
|
||||
syn keyword cxxStlKeywords contained containedin=cxxStlLibrary byte
|
||||
syn keyword cxxStlKeywords contained containedin=cxxStlLibrary,cxxBoostLibrary string_view
|
||||
|
||||
@ -68,7 +68,8 @@ syn keyword cxxStlKeywords containedin=cxxStlLibrary,cxxBoostLibrary function co
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary exception_ptr contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary iostream istream ostream fstream ifstream ofstream contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary stringstream istringstream ostringstream contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary iostream basic_string vector deque list pair queue priority_queue stack contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary iostream basic_string vector deque pair queue priority_queue stack contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary list forward_list
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary map multimap set multiset contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary istream_iterator ostream_iterator contained
|
||||
syn keyword cxxStlTypes containedin=cxxStlLibrary iterator contained
|
||||
|
@ -23,5 +23,9 @@ source ~/.vim/vimrc.functions
|
||||
source ~/.vim/vimrc.fileprefs
|
||||
source ~/.vim/vimrc.statusline
|
||||
|
||||
if exists('$CSHENV_TOUCHSCREEN')
|
||||
source ~/.vim/vimrc.mousescroll
|
||||
endif
|
||||
|
||||
set shell=/bin/tcsh
|
||||
"set t_Co=1
|
||||
|
@ -36,3 +36,8 @@ imap <ESC>[A <Up>
|
||||
imap <ESC>[B <Down>
|
||||
imap <ESC>[C <Right>
|
||||
imap <ESC>[D <Left>
|
||||
|
||||
" On my touchscreen laptop, the gnome keyboard doesn't have special keys...
|
||||
" So we map a key I'll never use to 'escape'
|
||||
imap £ <ESC>
|
||||
map £ <ESC>
|
||||
|
41
vim/vimrc.mousescroll
Normal file
41
vim/vimrc.mousescroll
Normal file
@ -0,0 +1,41 @@
|
||||
function! MouseScrollTouch()
|
||||
"mark b is the current cursor position
|
||||
"mark a is the previous cursor position
|
||||
norm mb
|
||||
let currPos= line('.')
|
||||
norm `a
|
||||
let prevPos= line('.')
|
||||
let amt= 1 + abs(currPos - prevPos) / 2
|
||||
"norm `bma
|
||||
while amt > 0
|
||||
if currPos>prevPos
|
||||
norm
|
||||
elseif currPos<prevPos
|
||||
"norm `bma
|
||||
norm
|
||||
endif
|
||||
let amt= amt - 1
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
function! MouseScrollClick()
|
||||
"mark b is the current cursor position
|
||||
"mark a is the previous cursor position
|
||||
norm mb
|
||||
let currPos= line('.')
|
||||
norm `a
|
||||
let prevPos= line('.')
|
||||
let amt= 1 + abs(currPos - prevPos) / 2
|
||||
norm `bma
|
||||
while amt > 0
|
||||
if currPos>prevPos
|
||||
norm
|
||||
elseif currPos<prevPos
|
||||
"norm `bma
|
||||
norm
|
||||
endif
|
||||
let amt= amt - 1
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
map <LeftDrag> ma<LeftMouse>:call MouseScrollTouch()<cr>
|
Reference in New Issue
Block a user