LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-11-2019, 08:29 PM   #1
toolkit
LQ Newbie
 
Registered: Apr 2002
Posts: 29

Rep: Reputation: 15
Vim converting some words to lowercase


Hi,

I keep a big scratchpad file that basically
records down commands and observations I want
to remember. It has grown quite big, the size about 70MB.

Recently, I noticed something quite unusual,
some of the letters had became lower caps.
e.g the original -


Quote:
watch -d 'tail swRootId -n 80 | grep "Root ID" -A 4'

becomes

Quote:
watch -d 'tail swrootid -n 80 | grep "root id" -a 4'
It is actually quite annoying, as cutting and pasting
to the command line will not work.

Is there a bug in Vim that subtlely corrupts the file
when it grows too big or is there a switch that I
accidentally turn on?

Thanks!
 
Old 07-11-2019, 09:15 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,264

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Quote:
Originally Posted by toolkit View Post
Is there a bug in Vim that subtlely corrupts the file
when it grows too big or is there a switch that I
accidentally turn on?
I doubt there's a bug. "Switches" (reading: options) are documented in the man page

Have you looked at man vim?
What's in ~/.vimrc? /etc/vimrc?

Last edited by scasey; 07-11-2019 at 09:16 PM.
 
Old 07-11-2019, 09:20 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,071
Blog Entries: 25

Rep: Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263Reputation: 4263
I've never encountered something like this in vim, but I've also never encountered a 70MB text file.
 
Old 07-11-2019, 09:44 PM   #4
toolkit
LQ Newbie
 
Registered: Apr 2002
Posts: 29

Original Poster
Rep: Reputation: 15
Ok here is my .vimrc

Quote:
set nocompatible


" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" YouCompleteMe Plugin is recommended to be handled by vbundle
"Plugin 'Valloric/YouCompleteMe'


" Plugin for apache velocity
Bundle "lepture/vim-velocity"


" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on

" Stop YCM from loading
let g:loaded_youcompleteme = 1


" Plugin for riv
Bundle 'Rykka/riv.vim'


"------ Settings for pathogen ----------------------
execute pathogen#infect()



"----- Settings needed vimwiki ----------------------
filetype plugin on


"------ End of vimwiki settings -------------------


set encoding=utf-8
set fileencoding=utf-8

set background=dark
set formatoptions=tq
set textwidth=78
set background=dark
set shiftwidth=2
set expandtab
set tabstop=4
set smartindent
set smarttab
set showcmd
set incsearch
set ignorecase
set diffopt+=iwhite
set diffexpr=""
syntax on
map <C-n> :NERDTreeToggle<CR>
map <F2> : ?\^\^<CR>
map <F3> : ?^\~<CR>
map <F4> : /\~<CR>
map <F5> : ?#\{2}<CR>
map <F6> : /#\{2}<CR>
map <F7> : ?^\d*-\d*-\d\d<CR>
map <F8> : /^\d*-\d*-\d\d<CR>
map <F9> : set textwidth=78<CR>
map <F10> : set textwidth=150<CR>
map <F11> 1G<CR>
map <F12> : w<CR>
map <F15> : ?^\d*-\d*-\d\d<CR>
ab bu ** -- **
ab hh ◦
ab ** ∙
ab (( ◉
" toc - 2726
ab )) ✦
ab cb ❒
ab tt ✔


The /etc/vimrc -

Quote:
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif

set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time

" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup fedora
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'"") > 0 && line ("'"") <= line("$") |
\ exe "normal! g'"" |
\ endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif

if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add $PWD/cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif

filetype plugin on

if &term=="xterm"
set t_Co=8
set t_Sb=dm
set t_Sf=dm
endif

" Don't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"

 
Old 07-11-2019, 09:59 PM   #5
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,264

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
A very brief search brought me to this page.

Does that help?
 
Old 07-11-2019, 11:02 PM   #6
toolkit
LQ Newbie
 
Registered: Apr 2002
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by scasey View Post
A very brief search brought me to this page.

Does that help?
Thanks for help. I have looked at the link, the command 'gu' seems to
display the same effects as the errors I am facing.

The strange thing is in this file, the 'closest' I get to running the
command is 'gq' for formatting purposes. There are no
macros I am running.

It is just a scratchpad - copy from some website, paste into it.
After that do some simple text formatting. That is about it...
 
Old 07-11-2019, 11:40 PM   #7
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,264

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
I know no more...I’ve never mastered vi(m)

I use SciTE on both Linux and Windows. Or nano, if I’m at the command line.
Sorry. Good Luck.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Joining line ending with lowercase and starting with lowercase, or uppercase hurd Linux - Newbie 11 05-01-2016 01:29 PM
how i can fetch some strings like words or some words Farah_s Linux - Newbie 6 03-14-2012 01:23 AM
Converting UPPERCASE extensions to lowercase hansmast Linux - General 4 02-17-2009 04:17 PM
Converting Uppercase to Lowercase AMMullan Linux - Software 6 10-18-2005 07:32 PM
Converting lowercase to uppercase noodle123 Programming 1 05-17-2002 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration