"
" nextval - Increment/decrement the current value with one keystroke
"
" Copyright (C) 2013 Michael Arlt
"
" Distributed under the GNU General Public License (GPL) 3.0 or higher
" - see http://www.gnu.org/licenses/gpl.html
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
" You should have received a copy of the GNU General Public License
" along with this program. If not, see .
" Version: 1.02
"
" Changes: 1.02
" - Set default keys to overwrite Vims internal cmd C-a (inc) and C-x (dec)
" Changes: 1.01
" - Added standard check if already loaded
" - Uses for automatic mapping (if not already defined)
" -> Changed plugin calling - see usage
" - Removed forgotten debug output (sorry)
" - Added buffer awareness
"
" Installation:
" # if you use pathogen:
" mkdir -p ~/.vim/bundle/netxval/plugin
" cp nextval.vim ~/.vim/bundle/netxval/plugin
" Usage: (e.g. in .vimrc)
" This is the default mapping if you did not define a setting on your own
" nmap + nextvalInc
" nmap - nextvalDec
" During editing position your cursor on a boolean, integer, number or
" hex value and press + or - in normal mode (esc).
" check if already loaded
if exists('g:nextval_plugin_loaded')
finish
endif
let g:nextval_plugin_loaded = 1
" default keymappings
if !hasmapto('nextvalInc')
nmap nextvalInc
endif
if !hasmapto('nextvalDec')
nmap nextvalDec
endif
" map to internal function
nnoremap