" " 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.1 " " Changes: 1.1 " - Added boolen for python (True/False) " - Added integer surrounded by text " - Added many hex-variants " - Improved float " - Bugfix: inc/dec "worked" if you where near a value " - Big thanx to serpent for code/feedback/ideas " - Added expamples in source for simpler testing " 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). " Tests: " 15 # int " -5 # neg. int " 0.1 # num/float " 0.25 # num/float " .2 # num/float " -0.1 # num/float " test5 # int surrounded " test123test # int surrounded " true # boolean " TRUE # boolean " True # boolean " 2b # hex " 0a # hex " 0xf9 # hex " 0F # hex " f # hex " F # hex " 5A3 # tex " ’ # xml/xhtml " \x19 # unix, bash " FFh or 05A3H # intel assembly " #9 # modulo2 " 16#5A3# # ada/vhdl " 16r5A3 # smalltalk/algol " 16#5A7 # postscript/bash " \u0019 \U00000019 # bash " #16r4a # common lisp " &H5A3 or &5a3 # several basic " 0h5A3 ti series " U+20AD # unicode " S=U+9 # integer " $5A3 # assembly/basic " H'ABCD' # microchip " x"5A3" # vhdl " 8'hFF # verilog " #x4a # common lisp " X'5A3' # ibm mainframe " 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