>On Friday, November 16, 2012 4:36:29 PM UTC-6, Bill Waters wrote: >> I have been using Vim for years, and this is a first. It is hanging on a >> Win7 PC. When it happens, the CPU gets pegged and I have to forcibly kill >> Vim. >> >> >> >> With this code snippet, it always happens when I type the '=' at the end >> of the line below. (I blanked out my variables names in this code example. >> That doesn't have an effect on the problem.) >> > >Is this C code or something else?
This is C > >Do you have your 'foldmethod' set to "syntax"? (I did not see an attachment). > I don't have a 'foldmethod' setting in my _vimrc, and when I do a ":set foldmethod" it says that it is set to "manual". >Vim has problems with syntax folding taking a long time to update, especially >> while you type in insert mode, although I've not seen it "hang" Vim before. >> Try setting foldmethod to "manual" if it is currently set to "syntax" to see >> if the problem goes away. If so, try this: > >http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text > >As for stopping it, if you have NOT mapped CTRL-C to something else (I sure >> hope you haven't), you can interrupt many actions simply by pressing CTRL-C. CTRL-C does free it back up. I should have thought to try that. >Finally, if none of the above helps: > >Can you reproduce without your _vimrc and customizations, by launching Vim >> with gvim -N -u NONE -i NONE -U NONE ? Below is my _vimrc. Thanks! Bill "------------------------------------------------------------------------------- " Standard _vimrc stuff "------------------------------------------------------------------------------- set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin set diffexpr=MyDiff() function! MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let eq = '' if $VIMRUNTIME =~ ' ' if &sh =~ '\<cmd' let cmd = '""' . $VIMRUNTIME . '\diff"' let eq = '"' else let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' endif else let cmd = $VIMRUNTIME . '\diff' endif silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq endfunction " When vimrc is edited, reload it autocmd! bufwritepost _vimrc source C:\Program Files\ (x86)\Vim\_vimrc "------------------------------------------------------------------------------- " Undo things from $VIMRUNTIME/vimrc_example.vim "------------------------------------------------------------------------------- set nobackup set nowb set noswapfile " See C:\Program Files\ (x86)\Vim\vimfiles\plugin_not_in_use\savevers.vim "" See C:\Program Files\ (x86)\Vim\vimfiles\plugin\savevers.vim "set backup "set backupdir=C:\\Program\ Files\ (x86)\\Vim\\_backup "set patchmode=.save "let savevers_dirs = &backupdir ""let savevers_max = 3 "------------------------------------------------------------------------------- " Undo things from $VIMRUNTIME/mswin.vim "------------------------------------------------------------------------------- " restore the number increment function unmap <C-A> " restore the visual block function unmap <C-V> " restore the interrupt command function unmap <C-C> "------------------------------------------------------------------------------- " Editor Appearance - lines, font, color scheme "------------------------------------------------------------------------------- colorscheme torte "colorscheme _delek set guifont=Courier set lines=79 let my_cwd = getcwd() if ((stridx(my_cwd, "\\Trojan") != -1) || (stridx(my_cwd, "\\USB_PD") != -1) || (stridx(my_cwd, "\\SMBus") != -1) || (stridx(my_cwd, "\\WP_TX") != -1) || (stridx(my_cwd, "\\MATLAB") != -1)) set columns=92 set textwidth=92 else set columns=80 set textwidth=80 endif "------------------------------------------------------------------------------- " My Set "------------------------------------------------------------------------------- set autoindent set shiftwidth=4 set expandtab set tabstop=4 set hidden " start gVIM without the toolbar set guioptions-=T " saves information about previous editing sessions to use again later set viminfo='50,<250,s25,h,rA:,rB: set shell=c:/cygwin/bin/bash.exe set shellcmdflag=-c " always list all completion option in command mode "set wildmode=list " auto-wrap comment lines "set formatoptions=acroq nnoremap <MouseUp> <C-MouseUp> nnoremap <MouseDown> <C-MouseDown> "------------------------------------------------------------------------------- " Miscellaneous "------------------------------------------------------------------------------- " Open each buffer in its own tabpage "au BufAdd,BufNewFile * nested tab sball " For the mru.vim plugin let MRU_File = 'C:\Users\a0207828\_vim_mru_files' "------------------------------------------------------------------------------- " Syntax Highlighting "------------------------------------------------------------------------------- " needed for GNU assembly file (.s) syntax highlighting autocmd BufRead,BufNewFile *.s setfiletype asm " needed for SREC file syntax highlighting autocmd BufRead,BufNewFile *.srec setfiletype srec " needed for SVF file syntax highlighting autocmd BufRead,BufNewFile *.svf setfiletype svf autocmd BufRead,BufNewFile *.cmp setfiletype svf " needed for MSP430 assembly file (.s43) syntax highlighting autocmd BufRead,BufNewFile *.inc setfiletype msp autocmd BufRead,BufNewFile *.s43 setfiletype msp " needed for Keil scatter file (.sct) syntax highlighting autocmd BufRead,BufNewFile *.sct setfiletype sct " needed for ARM assembly syntax highlighting "let asmsyntax='armasm' "let filetype_inc='armasm' "autocmd BufRead,BufNewFile *.arm setfiletype armasm " needed for system verilog syntax highlighting "let asmsyntax='verilog' "let filetype_inc='verilog' "autocmd BufRead,BufNewFile *.sv setfiletype verilog "------------------------------------------------------------------------------- " My mappings - Normal Mode " " Note: Comments can not be on the same line as the map command. "------------------------------------------------------------------------------- "nnoremap t j0. "nnoremap T j. "nnoremap s n. nnoremap <Tab> >> " Leave insert mode whenever I hit an arrow key "inoremap <up> <esc><up><right> "inoremap <down> <esc><down><right> "inoremap <left> <esc> "inoremap <right> <esc><right><right> " Redo one change which was undone. nnoremap <F1> :redo<CR> " Jump to previous window nnoremap <F2> <C-W>p " Open vertical split window "nnoremap <F3> :vsplit<CR>:set columns=161<CR><C-W>= nnoremap <F3> :vsplit<CR>:set columns=185<CR><C-W>= " Close vertical split window "nnoremap <F4> <C-W>q:set columns=80<CR> nnoremap <F4> <C-W>q:set columns=92<CR> " Move cursor down one row and perform the previous action again "nnoremap <F2> j. " Move cursor down one row, back to the first column, and perform the previous " action again "nnoremap <F3> j0. " copy all to system (Windows) buffer "nnoremap <F3> :%y+<CR> " Update tag information "nnoremap <F3> TlistUpdate<CR> " Display tag information in a vertical-split window "nnoremap <silent> <F4> :TlistToggle<CR> " Repeat the last recorded macro nnoremap <F5> @@ " Search and perform the previous action again nnoremap <F6> n. " Reformat a paragraph "nnoremap <F6> gqap " Duplicate a line and then join it to itself "nnoremap <F7> yypkJj " Turn off search highlighting nnoremap <F8> :nohlsearch<CR> " jump back to the previous file "nnoremap <F9> <C-^> " jump back to the first file "nnoremap <F10> :first<CR> " Compiling functions: nnoremap <F9> :wa<CR>:cd build<CR>:make DEVICE_ID=UCD90120 RELEASE=1<CR>:cd ..<CR> nnoremap <F10> :copen<CR> nnoremap <F11> :cclose<CR> nnoremap <F12> :cnext<CR> " Map upper right mouse button to 'last file' "nnoremap <X1Mouse> <C-^> " Map upper right mouse button to 'jump back on level on the tag stack' nnoremap <X1Mouse> <C-t> "nnoremap <X1Mouse> :bd<CR> " " This does a <C-t> if returning to the current file, else it does a :bd "nnoremap <X1Mouse> :let old=bufnr('%')<cr><c-t> " \:let new=bufnr('%')<bar> " \ if old != new<bar> " \ exe "bdelete " . old<bar> " \ endif<cr><cr> " Map double-click left-mouse to jump to the tag under the cursor "nnoremap <2-LeftMouse> :exe "tab stag" expand("<cword>")<CR> "nnoremap <2-LeftMouse> :!start gvim -t <cword><CR> nnoremap <2-LeftMouse> :exe "tag ". expand("<cword>")<CR> nnoremap <C-CR> :exe "tag ". expand("<cword>")<CR> " CSCOPE mappings (see ftplugin\c\cscope_maps.vim) " " 's' symbol: find all references to the token under cursor " 'g' global: find global definition(s) of the token under cursor " 'c' calls: find all calls to the function name under cursor " 't' text: find all instances of the text under cursor " 'e' egrep: egrep search for the word under cursor " 'd' called: find functions that function under cursor calls " " The result of your cscope search will be displayed in the current window. " You can use CTRL-T to go back to where you were before the search. nnoremap <C-F1> :cs find s <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F2> :cs find g <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F3> :cs find c <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F4> :cs find t <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F5> :cs find e <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F6> :cs find d <C-R>=expand("<cword>")<CR><CR> " Result displayed in the new horizontal-split window. nnoremap <C-F7> :scs find d <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F8> :scs find e <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F9> :scs find t <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F10> :scs find c <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F11> :scs find g <C-R>=expand("<cword>")<CR><CR> nnoremap <C-F12> :scs find s <C-R>=expand("<cword>")<CR><CR> " Update cscope data base if (stridx(my_cwd, "\\WP_TX") != -1) nnoremap <S-F1> :wa<CR>:cscope kill 0<CR> \ :!cscope -b -k *.c *.h "C:/ti/ccsv5/tools/compiler/msp430/include/*.h" "C:/ti/ccsv5/ccs_base/msp430/include/msp430g2553.h" "C:/ti/ccsv5/ccs_base/msp430/include/in430.h"; mkdir -p build; mv -f cscope.* build<CR> \ :cscope add build\cscope.out<CR> else nnoremap <S-F1> :wa<CR>:cscope kill 0<CR> \ :!cscope -b -k *.c *.h; mkdir -p build; mv -f cscope.* build<CR> \ :cscope add build\cscope.out<CR> endif " Get rid of the ^M at the end of the lines and fix the file type nnoremap <S-F2> :%s/\r//<CR>:set fileformat=dos<CR>:w<CR> " Remove all tabs "nnoremap <F7> 1G!Gpr -t -e<CR>'' nnoremap <S-F3> :%retab!<CR> " Remove all white space at the end of a line nnoremap <S-F4> :%s/\s\+$//<CR> " Make a copy of the current line and increment the number on the copied line nnoremap <S-F5> yyp0<C-A> " Run indent on the entire file nnoremap <silent> <S-F7> :%!indent<CR> " Run indent on the visual selection vnoremap <S-F8> :!indent<CR> " Highlight C function declarations "nnoremap <S-F9> /^[^ \t/{}*#].*(.*$<CR> "nnoremap <S-F9> /^\s*[a-zA-Z0-9_* \t]\+([a-zA-Z0-9_* )\t,]\+$<CR> "nnoremap <S-F9> /^\s*[^/]\w\+\s\+\w\+.*(.*\n\+\s*{<CR> " "NOTE: Does not match functions that are indented... "nnoremap <S-F9> /^\([a-zA-Z0-9_*]\+\s*\)\+(.*[^;]$<CR> "nnoremap <S-F9> /^[a-zA-Z_][a-zA-Z0-9_* \t]\+(.*[^;]$<CR> nnoremap <S-F9> /^\h[a-zA-Z0-9_* \t]\+(.*[^;]$<CR> " open my file that summarizes the plugins that I have installed nnoremap <S-F11> :!start gvim "C:\Program\ Files\ (x86)\Vim\my_vim_docs\vim_plugins.txt"<CR><CR> " open my vim tips file nnoremap <S-F12> :!start gvim "C:\Program\ Files\ (x86)\Vim\my_vim_docs\vim_tips.txt"<CR><CR> "------------------------------------------------------------------------------- " My mappings - Insert Mode " " Note: Comments can not be on the same line as the map command. "------------------------------------------------------------------------------- " map Tab to word completion function " Note: You can still get a tab char with <Shift>-<Tab> inoremap <Tab> "------------------------------------------------------------------------------- " My mappings - Visual Mode " " Note: Comments can not be on the same line as the map command. "------------------------------------------------------------------------------- " Use the tab to shift text right and left in visual mode vnoremap <Tab> > vnoremap <S-Tab> <LT> " allows * to work for more than a single word, any stuff up to a line's worth vnoremap * y:exe 'norm! /' . escape(@@, '/*.\[$^~') . "\r"<cr> " Alignment Tool mappings (:help align) vmap <A-F1> \t=<CR> " = vmap <A-F2> \t,<CR>:B s/\s\+,/,/<CR> " , vmap <A-F3> \tml<CR> " continue lines vmap <A-F4> \t#<CR> " # vmap <A-F5> \adec<CR> " declarations vmap <A-F6> \t:<CR> " : vmap <A-F7> \ascom<CR> " title and staggered comments vmap <A-F8> \acom<CR> " comment vmap <A-F9> \adef<CR> " definitions vmap <A-F10> \a,<CR> " break up comma-separated declarations vmap <A-F11> \tab<CR> " table vmap <A-F12> \anum<CR> " numbers -- 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
