Skip to content

Add option to disable map for ; and . #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/space.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ commands. Here's a list of commands that disable the use of the <Space> key
Disable <Space> for character movements >
let g:space_no_character_movements = 1

Disable <Space> for ONLY repeat character movements, e.g. ;,
let g:space_no_character_repeat_movements = 1

Disable <Space> for search commands >
let g:space_no_search = 1

Expand Down
10 changes: 8 additions & 2 deletions plugin/space.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
" Disable <Space> for character movements, e.g. fFtT;,
" let g:space_no_character_movements = 1
"
" Disable <Space> for ONLY repeat character movements, e.g. ;,
" let g:space_no_character_repeat_movements = 1
"
" Disable <Space> for searches, e.g. /?#*nN
" let g:space_no_search = 1
"
Expand Down Expand Up @@ -75,6 +78,7 @@

if exists("g:space_debug")
let g:space_no_character_movements = 0
let g:space_no_character_repeat_movements = 0
let g:space_no_search = 0
let g:space_no_jump = 0
let g:space_no_diff = 0
Expand Down Expand Up @@ -115,8 +119,10 @@ if !exists("g:space_no_character_movements") || !g:space_no_character_movements
noremap <expr> <silent> F <SID>setup_space("char", "F")
noremap <expr> <silent> t <SID>setup_space("char", "t")
noremap <expr> <silent> T <SID>setup_space("char", "T")
noremap <expr> <silent> ; <SID>setup_space("char", ";")
noremap <expr> <silent> , <SID>setup_space("char", ",")
if !exists("g:space_no_character_repeat_movements") || !g:space_no_character_repeat_movements
noremap <expr> <silent> ; <SID>setup_space("char", ";")
noremap <expr> <silent> , <SID>setup_space("char", ",")
endif

if exists("g:space_disable_select_mode")
silent! sunmap f
Expand Down