Thursday, July 6, 2023

Re: 'Keyboard input' vs 'cursor copy+paste' for "repeat" (.) action

"###########################################################################################
"###
"### Customized .vimrc for primary user/owner of Desktop host
"###
"###########################################################################################
"
"
"###
"###### General Configuration Options
"###

"set noshowmode


"###
"###### Hardcopy Options
"###### See: https://vimdoc.sourceforge.net/htmldoc/print.html#print-options
"###### See: https://vimdoc.sourceforge.net/htmldoc/options.html#'statusline' for header format
"###

"### Specify font for printout
"set printmbcharset="default"
"set printoptions="paper:letter,portrait:n,duplex:off,left:5pc,right:5pc,top:5pc,bottom:5pc,syntax:n,wrap:y"
"set printoptions="portrait:n,duplex:off,wrap:y,syntax:n"
set printoptions="wrap:y,syntax:n,left:5pc,right:5pc,top:5pc,bottom:5pc"
set printfont="Courier:h15"
"#set printheader="%t%=%{strftime('%c')}%=Page %N"
set printheader="%<%f%=Page %N"


"###
"###### User Interface Options
"###

"### Always show status bar
set laststatus=2
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)
"set noruler
syntax enable

"### Setting to display line numbers
set number
set numberwidth=8

"### Use colors that suit a dark background
set background=dark

"### Setting colors to 256 bits
"set t_Co=256 " ... instead of 256 x 256

"### Setting preffered colour scheme
colorscheme OASIS_darkbone
set cursorline
"set cursorcolumn
"highligh CursorLine guibg=lightblue ctermbg=lightgrey

"### Disable beep on errors
set noerrorbells

"### Show the current file name as the window title
set title


"### Indentation Options
set autoindent
filetype plugin indent on
set tabstop=8
set noexpandtab
set wrap


"### Search Options
set incsearch
set ignorecase
set smartcase
"set hlsearch


"### Text Rendering Options
set encoding=utf-8
set linebreak
set scrolloff=3
set sidescrolloff=5

"
"### Mapping Keystrokes to Useful Actions
set backspace=indent,start "Removed 'eol' to prevent erasing beyond start of line
map <C-O> <ESC>:w<CR>

"### Placing matched string always at center of screen
"nnoremap n nzz
"nnoremap N Nzz

"### Miscellaneous Options
set confirm
set nospell
"set shell


"### OPTIONS NOT RECOMMENDED
"# :set nowb


"### Configure action UNDO function
set history=1000 " Specify the length of the action undo list

"### Configure persistent UNDO function
silent! call mkdir(${HOME}."/.vim/wrkUndodir", "p")
set undofile " Save undos after closing files
set undodir=${HOME}/.vim/wrkUndodir// " Where to save undos
set undolevels=1000 " Max number of undos
set undoreload=10000 " Number of lines to save for undo reload

"### Configure file BACKUP function
silent! call mkdir(${HOME}."/.vim/wrkBackup", "p")
set backup
set backupdir=${HOME}/.vim/wrkBackup//


"### Configure SWAP file function
silent! call mkdir(${HOME}."/.vim/wrkSwap", "p")
set swapfile
set directory=${HOME}/.vim/wrkSwap//

"### REF: https://www.vim.org/scripts/script.php?script_id=1488
"### Allow VIM/GVIM to offer expanded functionality beyond original 'vi' function set
set nocompatible


"### Set simultaneous syntax check for multiple languages
"setfiletype sh.awk.sed


"### Set Font and Size
set guifont=Monospace\ 11

"### Set Window geometry at opening
"set lines=40
"set columns=110


"### Set Custom Keymap Assignments

"### Mapping <F2> to split window into 2 panes and open shell in terminal window in bottom pane
map <F2> :bot terminal

"### Define compiler integration functions
"map <F5> <ESC>:w<CR>:exec '!swipl -g "consult(''%''), main, halt"'<CR>
"map <F5> <ESC>:w<CR>:exec '!gprolog --consult-file (''FILE'') --query-goal (''GOAL'')'<CR>
"map <F5> <ESC>:w<CR>:exec '!gprolog --consult-file ''%'' --query-goal ''%'' '<CR>
"map <F5> <ESC>:w<CR>:exec '!gprolog --consult-file ''%'' --query-goal ''%'' '<CR>

"## https://stackoverflow.com/questions/26329744/run-prolog-code-through-vim-editor
"set make=/usr/bin/gprolog --consult-file %

"23456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+
" 2
" 3
" 4
" 5
" 6
" 7
" 8
" 9
"10
"11
"12
"13
"14
"15
"16
"17
"18
"19
"20
"21
"22
"23
"24
"25
"26
"27
"28
"29
"30
"31
"32
"33
"34
"35
"36
"37
"38
"39
"40


"###########################################################################################
"###########################################################################################

Thank you, Salman.

My customizations are limited to the appearance and layout.  I have not installed any related to action-key mappings.  I don't know how to obtain a report of all such mappings (default + custom).  If anything was mapped differently, it was not disclosed as part of the appearance plug-ins.

Attached is my .vimrc file.

Under plugin, I have the following:

ColorSchemeEditor.glade
ColorSchemeEditor.py
ColorSchemeEditor.vim
CSApprox.vim
ScrollColor.vim
VIM__ID_2180__ColorSchemeEditor   (directory)

Under each of pack and bundle, there is nothing populated.

Under autoload, there is only

csapprox.vim

Everything under after relates to csapprox.

Under syntax, I have:

bash.vim.SUPPRESS
BOURNE.txt
logtalk.vim
lprolog.vim
modsim3.vim
prolog.vim
sh.vim.DISTRO
sh.vim.GITHUB
sh.vim.HIDE
sh.vim.Oasis
sh.vim.SUPPRESS

Given the above, I don't see why it is behaving as it is.

Eric


On 2023-07-06 12:09, Salman Halim wrote:
On Windows, if my * register (system clipboard) contains some text and I type:

iHello <c-r>=*<esc>

Then, hitting . repeats the whole thing, including the pasted text. Perhaps you're pasting in a different way?

Do you have custom mappings? Some plugins take over the . (such as repeat.vim).

Salman

On Thu, Jul 6, 2023, 11:54 Eric Marceau <eajmarceau@gmail.com> wrote:

Thank you, meine.

Not sure that you understood that my

/*typed-input*/ and /*copy+paste*/    

are both during the same insert/replace operation.

Since both inputs have been "inserted" together (in my view),

why are they not being captured as a complete set for the

repeat operation?


Eric

On 2023-07-06 03:42, meine wrote:
On Wed, Jul 05, 2023 at 04:23:54PM -0400, Eric Marceau wrote:  
Currently using        VIM version 8.1.3741      on Ubuntu MATE (Linux 5.4.0-150-generic #167-Ubuntu)    When I /copy+paste/ text using the system cursor,        regardless of whether that text is from another non-Vim      window, or from the text file currently in the Vim window,    if the text string being inserted is a combination of  */typed-input/* and /*copy+paste*/,  the Vim's "." (repeat operator)  seems to ignore the /copy+paste/ text and will *only* repeat  that portion of the entry which was /directly-typed at the //  //keyboard/ (i.e. xyz{cut+paste_text}<return>abc )!!!    Is that behaviour controlled by a modifiable Vim parameter  which can be set to allow both inputs to be captured as  a *single operation for full repeat*?  
Cutting and copying tekst places the text in a register -- the '0  register'. The paste command places the contence of that register where pasted.    The pasting can be repeated with the dot-command, it pastes the same  text from the dot-register.    Since the dot-command only repeats the last command, it kan only repeat  the pasting. Copying another word overwrites the buffer the text is  copied into.    You could make a small macro to combine commands you want and use that.    Vim has several registers that you can use to copy text into and only  call that register to paste the text. The working is great but can be  overwhelming to learn. See `help: registers`.    //meine    
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/6fd8c8e4-d7f4-bd54-eab0-a4e668858ec3%40gmail.com.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEejG1MmCrnosVX8YDh7JkKi%2BEGDR5fqoEmL0GQMLvhJtw%40mail.gmail.com.

No comments:

Post a Comment