Just a follow up. When i remove .vimrc entirely i get entirely different encoding results: i.e.:
[EMAIL PROTECTED] filesystem ([EMAIL PROTECTED]) So, i tried a different vimrc file (attached) and now no apostrophe's or quotes are rendered. Oh Well:( On Wednesday 18 June 2008 11:04, Rion D'Luz wrote: > Hail Vaguers! > > I feel really stupid posting this but i'm at whits' end and searching the net > has turned up nada. > I'm running vim7.0 on ubuntu and AFAIK, it has unicode support. > > Basically, my vimrc file as evolved over the years and i did something that > now results in my > seeing UTF-8 characters in the textfiles i'm editing; mostly as a result of > copy/paste from > webpages. > i.e. > Weeding for Your Library\u2019s Health > ^^^^^^^ > I am not alone in the issue, but so far any solutions mentioned have come to > naught > and i'm not completely sure if the issue is vim or some stupid xterm setting. > But its a real PITA > > TIA, > > Rion > > > Ref: > http://www.mail-archive.com/[EMAIL PROTECTED]/msg08788.html > bbs.archlinux.org/viewtopic.php?pid=288157 > www.mail-archive.com/[EMAIL PROTECTED]/msg00491.html > -- email: rion_at_dluz.com web: http://dluz.com/Rion/ AIM/Jabber/Google: riondluz Phone: 802.644.2255 http://www.linkedin.com/pub/6/126/769 Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
"This original file was created by: "Linux-Mandrake configuration. "Chmouel Boudjnah <[EMAIL PROTECTED]> "Edited by Ido Kanner "some options copied from http://www.vi-improved.org/vimrc.php and other places as well "some also from http://phd.pp.ru/Software/dotfiles/vimrc.html " RION: from: " ik.homelinux.org/projects/files/vimrc set nocompatible " Use Vim defaults (much better!) filetype on filetype plugin on filetype indent on "Terminal issues if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "xterm" || &term =~ "linux" " set t_Co=16 set t_Co=255 set t_Sf=[3%dm set t_Sb=[4%dm endif behave xterm " we are using xterm like terminal ... set notitle "2008JUN18 RION: unremd below if &term == "screen" " if we are using screen, set notitle " do have title on the "terminal" else " otherwise set title " display the title on the terminal... endif "Syntax highlighting only for enhanced-vi and we are in gui/color terminal if &t_Co > 2 || has("gui_running") syntax on endif "Keystroke mapping "I know it's horrible for a vi master but useful for newbies. imap <C-a> <Esc>I imap <C-e> <ESC>A map <C-Tab> <C-W>w imap <C-Tab> <C-O><C-W>w cmap <C-Tab> <C-C><C-Tab> "Some macros to manage the buffer of vim map <F5> :bp<C-M> map <F6> :bn<C-M> map <F7> :bd<C-M> " Search stuff map <silent> <F3> n map <silent> <S-F3> N imap <silent> <F3> <C-O>n imap <silent> <S-F3> <C-O>N "noremap <F4> :if 1 == &hls \| noh \| else \| set hls \| endif \| <CR> " toggle highlight search (folke) "Folds - from plugins nnoremap <silent> <F4> :MyFoldEnable<CR> nnoremap <silent> <s-F4> :MyFoldDisable<CR> " "2008JUN18 RION: how do i stop line numbering? " Toggle numbering map <silent> <C-F12> :set number!<CR> "imap <silent> <C-F12> <C-O> :set number!<CR> "use <F6> to cycle through split windows (and <Shift>+<F6> to cycle backwards, where possible): " nnoremap <C-F7> <C-W>w nnoremap <S-F7> <C-W>W noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm " Remove the Windows ^M set pastetoggle=<C-P> " Paste toggle - when pasting something in, don't indent. "map <leader>s :source ~/.vimrc<cr> " Fast reloading of the .vimrc "autocmd! bufwritepost .vimrc source ~/.vimrc " When .vimrc is edited, reload it nmap _d "=strftime("%d.%m.%Y")<CR>p " Appends / insert current date nmap _D "=strftime("%d.%m.%Y")<CR>P nmap _h :cd%:h<CR> " Changes directory to the one of the current file "2008JUN18 RION: remd below " Suppresses all spaces at end/beginning of lines "nmap _s :%s/\s\+$//<CR> "nmap _S :%s/^\s\+//<CR> " command Unixformat :set ff=unix " convert eol to unix style command Dosformat :set ff=dos " convert eol to dos style command Macformat :set ff=mac " convert eol to mac style " Enable this if you mistype :w as :W or :q as :Q. " nmap :W :w " nmap :Q :q map <C-c> ga " when pressing on CTRL+C we will know what is the value of the chars we are stanting under map <C-o> gf " open file under the cursor. "Support for split window man page au BufRead *.* :source $VIMRUNTIME/ftplugin/man.vim inoremap <C-K> <c-r>:Man <cword><cr> noremap K :Man <cword><cr> "############################################ File type handing ############################################ "" Gzip and Bzip2 files support " Take from the Debian package and the exemple on $VIM/vim_exemples if has("autocmd") autocmd BufReadPost * if line("'\"") | exe "normal '\"" | endif " try to restore last known cursor position " Keywords are alpha-numeric characters (possibly including ISO-8859-x " accented characters) are words. Underscores are words. Apostrophes are " words. Anything else is NOT part of a word. autocmd BufReadPost * set iskeyword=A-Z,a-z,160-255,48-57,',_ " Set some sensible defaults for editing C-files augroup cprog " Remove all cprog autocommands au! " When starting to edit a file: " For *.c and *.h files set formatting of comments and set C-indenting on. " For other files switch it off. " Don't change the order, it's important that the line with * comes first. " autocmd BufRead * set formatoptions=tcql nocindent comments& " autocmd BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// augroup END " Also, support editing of gzip-compressed files. DO NOT REMOVE THIS! " This is also used when loading the compressed helpfiles. augroup gzip " Remove all gzip autocommands au! " Enable editing of gzipped files " read: set binary mode before reading the file " uncompress text in buffer after reading " write: compress file after writing " append: uncompress file, append, compress file autocmd BufReadPre,FileReadPre *.gz set bin autocmd BufReadPre,FileReadPre *.gz let ch_save = &ch|set ch=2 autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip autocmd BufReadPost,FileReadPost *.gz set nobin autocmd BufReadPost,FileReadPost *.gz let &ch = ch_save|unlet ch_save autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . %:r autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r autocmd FileAppendPre *.gz !gunzip <afile> autocmd FileAppendPre *.gz !mv <afile>:r <afile> autocmd FileAppendPost *.gz !mv <afile> <afile>:r autocmd FileAppendPost *.gz !gzip <afile>:r augroup END "augroup gzip " Remove all gzip autocommands "au! " Enable editing of gzipped files " set binary mode before reading the file " autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin " autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gunzip") " autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bunzip2") " autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip") " autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2") " autocmd FileAppendPre *.gz call GZIP_appre("gunzip") " autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2") " autocmd FileAppendPost *.gz call GZIP_write("gzip") " autocmd FileAppendPost *.bz2 call GZIP_write("bzip2") " After reading compressed file: Uncompress text in buffer with "cmd" " fun! GZIP_read(cmd) " let ch_save = &ch " set ch=2 " execute "'[,']!" . a:cmd " set nobin " let &ch = ch_save " execute ":doautocmd BufReadPost " . expand("%:r") " endfun " After writing compressed file: Compress written file with "cmd" " fun! GZIP_write(cmd) " !mv <afile> <afile>:r " execute "!" . a:cmd . " <afile>:r" " endfun " Before appending to compressed file: Uncompress file with "cmd" " fun! GZIP_appre(cmd) " execute "!" . a:cmd . " <afile>" " !mv <afile>:r <afile> " endfun "augroup END " gzip augroup bzip2 " Remove all bzip2 autocommands au! " Enable editing of bzipped files " read: set binary mode before reading the file " uncompress text in buffer after reading " write: compress file after writing " append: uncompress file, append, compress file autocmd BufReadPre,FileReadPre *.bz2 set bin autocmd BufReadPre,FileReadPre *.bz2 let ch_save = &ch|set ch=2 autocmd BufReadPost,FileReadPost *.bz2 set cmdheight=2|'[,']!bunzip2 autocmd BufReadPost,FileReadPost *.bz2 set cmdheight=1 nobin|execute ":doautocmd BufReadPost " . %:r autocmd BufReadPost,FileReadPost *.bz2 let &ch = ch_save|unlet ch_save autocmd BufWritePost,FileWritePost *.bz2 !mv <afile> <afile>:r autocmd BufWritePost,FileWritePost *.bz2 !bzip2 <afile>:r autocmd FileAppendPre *.bz2 !bunzip2 <afile> autocmd FileAppendPre *.bz2 !mv <afile>:r <afile> autocmd FileAppendPost *.bz2 !mv <afile> <afile>:r autocmd FileAppendPost *.bz2 !bzip2 -9 --repetitive-best <afile>:r augroup END " vim -b : edit binary using xxd-format! augroup Binary au! au BufReadPre *.bin let &bin=1 au BufReadPost *.bin if &bin | %!xxd au BufReadPost *.bin set ft=xxd | endif au BufWritePre *.bin if &bin | %!xxd -r au BufWritePre *.bin endif au BufWritePost *.bin if &bin | %!xxd au BufWritePost *.bin set nomod | endif augroup END "Read pdf file inside vim autocmd BufReadPost *.pdf %!pdftotext -nopgbrk "%" - |fmt -csw78 " for C-like programming, have automatic indentation: autocmd FileType c,cpp,slang set cindent " when using { make sure that } will also be placed ... autocmd FileType c,cpp,slang iab { {<CR>}<UP> autocmd FileType c,cpp,slang set commentstring=\ \/\*\ %s\ \*\/ " put # name for the folded text # {{{ to begin marker and # }}} close to end it. " for actual C (not C++) programming where comments have explicit end " characters, if starting a new line in the middle of a comment automatically " insert the comment leader characters: "autocmd FileType c set formatoptions+=ro " for Perl programming, have things in braces indenting themselves: autocmd FileType perl set smartindent autocmd FileType perl set isk+=_,$,@,%,#,- " none of these should be word dividers, so make them not be autocmd FileType perl setlocal include=\\<\\(use\\\|require\\)\\> autocmd FileType perl set commentstring=\ #\ %s " put # name for the folded text # {{{ to begin marker and # }}} close to end it. " for CSS, also have things in braces indented: "autocmd FileType css set smartindent " when using { make sure that } will also be placed ... "autocmd FileType css iab { {<CR><CR>}<UP> " for HTML, generally format text, but if a long line has been created leave it " alone when editing: "autocmd FileType html set formatoptions+=tl " for both CSS and HTML, use genuine tab characters for indentation, to make " files a few bytes smaller: autocmd FileType html,htm,css set expandtab tabstop=2 autocmd FileType html,htm set noai "autocmd FileType html,htm set nosi "au BufNewFile,BufRead *.xml,*.htm,*.html so XMLFolding " Lets remove the auto indent that massed up with my html code "autocmd FileType htm,html let b:did_indent = 1 "xml "autocmd FileType xml,rss,rdf set expandtab tabstop=2 "autocmd FileType xml,rss,rdf set let b:did_indent = 1 "au BufNewFile,BufRead *.rss,*.rdf set ft=xml " in makefiles, don't expand tabs to spaces, since actual tab characters are " needed, and have indentation at 8 chars to be sure that all indents are tabs " (despite the mappings later): autocmd FileType make set noexpandtab shiftwidth=8 "Python "autocmd FileType python set noexpandtab " make sure that tabs are not spaces "autocmd FileType python set expandtab autocmd FileType python set textwidth=0 " do not break lines when line length increases "autocmd FileType python set shiftwidth=2 " make sure that tabs width is 2 spaces length "autocmd FileType python set tabstop=2 "autocmd FileType python set softtabstop=2 "autocmd FileType python set autoindent " Copy indent from current line when starting a new line. autocmd FileType python set backspace=indent,eol,start " makes backspace key more powerful. "autocmd FileType python set wildmenu " show some autocomplete options in status bar " Use the below highlight group when displaying bad whitespace is desired autocmd FileType python highlight BadWhitespace ctermbg=red guibg=red autocmd FileType python match BadWhitespace /^\t\+/ " Display tabs at the beginning of a line in Python mode as bad autocmd FileType python set fileformat=unix " make sure we are using unix eol autocmd FileType python let python_highlight_all=1 " For full syntax highlighting autocmd FileType python textwidth=79 " guidelines for better coding style of python autocmd FileType python set commentstring=\ #\ %s " put # name for the folded text # {{{ to begin marker and # }}} close to end it. "2008JUN18 RION: remd below "Pascal coding "au BufNewFile,BufRead *.pp,*.pas,*.p,*.inc,*.dpr,*.lfm,*.lrs,*.lpr set ft=delphi " set the right syntax file "autocmd FileType delphi,pascal set isk+=#,@,$,^ " none of these should be word dividers, so make them not be "autocmd FileType delphi,pascal set ignorecase " don't care about the case of the search ... "autocmd FileType delphi,pascal set nosmartcase " don't ignore case if we have upper or lower words " when writing the command "begin" it will complete itself to the "end" command as well " Buggy command, so for now do not use it "autocmd FileType delphi,pascal iab begin <SPACE>begin<SPACE><CR><CR>end<UP> " Filetypes (au = autocmd) au FileType helpfile set nonumber " no line numbers when viewing help au FileType helpfile nnoremap <buffer><cr> <c-]> " Enter selects subject au FileType helpfile nnoremap <buffer><bs> <c-T> " Backspace to go back "ruby autocmd Filetype ruby source ~/.vim/ruby-macros.vim autocmd FileType ruby set commentstring=\ #\ %s " put # name for the folded text # {{{ to begin marker and # }}} close to end it. "php autocmd FileType php set commentstring=\ #\ %s " put # name for the folded text # {{{ to begin marker and # }}} close to end it. "Text files "autocmd FileType text setlocal textwidth=78 "autocmd FileType text set nocindent endif " has ("autocmd") "######################################## End of file type handing ######################################## "Editing things ... set tabstop=2 " I like only 2 spaces as a tab set shiftwidth=2 " I like only 2 spaces as a tab even on ident set softtabstop=2 " guess what this does :) set expandtab " make sure tabs are spaces "set shiftround set bs=2 " Default backspace like normal set autoindent " auto ident "2008JUN18 RION: remd below "set si " smart ident set backspace=eol,start,indent " Set backspace set whichwrap+=<,>,h, " Bbackspace and cursor keys wrap to set delcombine " Delete combining characters individually "set list " place ^char on unprinted chars and '$' at the end of the line set joinspaces " add spaces between things "set autowrite " start writing "set term=builtin_ansi " if you have problems with inserting chars when arrow are presses, use this "General settings set encoding=utf-8 " we are working with utf-8 ... set termencoding=utf-8 " even on terminal ... set fileencodings=utf-8,ucs-bom,iso-8859-8-i,iso-8859-8,iso-8859-1 set ffs=unix,mac,dos " support all three, in this order "set makeef=error.err " When using make, where should it dump the file set history=1000 " How many lines of history to remember set backup " create a backup set uc=10 " updatecount number of characters typed to cause a swap file update set shell=bash " Set shell to be bash set autoread " Set to auto read when a file is changed from the outside set modeline " last lines in document sets vim mode set modelines=3 " number lines checked for modelines "2008JUN18 RION: how useful is below? set path=.,~/include/**,~/src/**2,~/.vim/**2,~/lib/**2,/usr/include/**,/usr/X11R6/include/,/usr/local/include set clipboard=autoselect " add things to clipboard "set clipboard+=unnamed " share clipboard with windows clipboard "set viminfo='20,\"50 " Read/write a .viminfo file, don't store more than 50 lines of registers. set viminfo='100,f1 "Visual "plugin code " Select colormap: 'soft', 'softlight', 'standard' or 'allblue' "let xterm16_colormap = 'allblue' " minibufexplorer settings:j "let g:miniBufExplMapWindowNavArrows = 1 "let g:miniBufExplMapCTabSwitchWindows = 1 " Select brightness: 'low', 'med', 'high', 'default' or custom levels. "let xterm16_brightness = 'default' "colorscheme koehler "colorscheme darkblue colorscheme desert set showmode " show mode at the bottom set background=light " making sure we will have dark color, we enter light one before set background=dark " we need lighter view set laststatus=1 " alaways display a status-bar. set showcmd " display incomplete commands set showmode " display the current mode and partially-typed commands in the status line: "set mouse=ar " have the mouse enabled all the time, and hit return set ttyfast " Indicates a fast terminal connection set ttyscroll=0 " Turn off scrolling (this is faster). set nomh " don't hide the mouse "set so=7 " "Set 7 lines to the curors - when moving vertical.. set shortmess+=r " use "[RO]" for "[readonly]" to save space in the message line: set shortmess+=atI " Abbreviate messages set nomodeline " don't have files trying to override this .vimrc: set showmatch " Show matching parenthese. set vb t_vb= " No sound bell only visual one set noerrorbells " don't make noise same as the above :) set ruler " Show the position of the cursor. "set textwidth=80 " Terminal for 80 char ? so vim can play till 79 char. "set nowrap " no wrap set cf " enable error files and error jumping set viminfo+=! " make sure it can save viminfo set lsp=0 " space it out a little more (easier to read) set wildmenu " turn on wild menu -> select options using tab above set cmdheight=1 " the command bar is 1 high set statusline=~ " Set a statusbar set lz " do not redraw while running macros (much faster) (LazyRedraw) "set hid " you can change buffer without saving set report=0 " tell us when anything is changed via :... "set fillchars=vert:\ ,stl:\ ,stlnc:\ " make the splitters between windows be blank set nostartofline " Do not jump to first character with page commands, " i.e., keep the cursor in the current column. " RION: remd below - i dont want line numbers "set number " show me the line numbers at the left side as well """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Folding " Enable folding, but by default make it act like folding is off, because folding is annoying in anything but a few " rare cases """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set fo=tcrqn set foldenable " Turn on folding "set foldmethod=indent " Make folding indent sensitive set foldmethod=marker " this lets us put the marker in the file so that it can be shared across and stored in version control. "set foldlevel=200 " Don't autofold anything (but I can still fold manually) set foldlevel=0 " default fold level, all open, set it 200 or something to make it all closed. set foldopen=hor,mark,tag " fold "set foldopen-=search,undo " don't open folds when you search into them "set foldopen-=undo " don't open folds when you undo stuff highlight Folded ctermfg=6 ctermbg=0 highlight FoldColumn ctermfg=6 ctermbg=0 " List and complete set wildchar=<TAB> " use tab for auto-expansion in menus set wmnu " show a list of all matches when tabbing a command when using TAB " have command-line completion <Tab> (for filenames, help topics, option names) " first list the available options and complete the longest common part, then " have further <Tab>s cycle through the possibilities: set wildmode=list:longest,full set wildignore=*.o,*.r,*.so,*.sl,*.tar,*.tgz " ignore some files for filename completion set su=.h,.bak,~,.o,.info,.swp,.obj " some filetypes got lower priority set complete=.,w,b,u,t,i " order and what to complete. see ":help complete" for info " enable dictionary (add k to complete to scan dict when completing) " set dict=<FILENAME> " adjust case of a keyword completion match "set infercase set nosft " showfulltag when completing tags in Insert mode show only the name not any arguments " (when a c-funtion is inserted) set showfulltag "display full decleration and not only the name when comleting in insert mode "Search and replace "set hlsearch "set incsearch " start finding as I type ... set noincsearch " do not increase search set gdefault " assume the /g flag on :s substitutions to replace all matches in a line: set ignorecase " don't care about the case of the search ... set smartcase " ignore ignorecase when pattern contains uppercase set matchpairs+=<:> " have % bounce between angled brackets, as well as t'other kinds: set mat=5 " how many tenths of a second to blink matching brackets for set magic " the way we use special chars set wrapscan " begin search at top when EOF reached " Window set nomousef " do not follow the mouse for a focus set wh=1 " minimal number of lines used for the current window set wmh=0 " minimal number of lines used for any window set noequalalways " make all windows the same size when adding/removing windows set splitbelow " a new window is put below the current one set hidden " Allow to switch between buffers/windows when the buffer was modified "set winheight=2 " At least 2 lines for current window "set winminheight=0 " Allow zero-height windows "------------------------------------------------------------------------------ " Correct typos. "------------------------------------------------------------------------------ " English. iab beacuse because iab becuase because iab acn can iab cna can iab centre center iab chnage change iab chnages changes iab chnaged changed iab chnagelog changelog iab Chnage Change iab Chnages Changes iab ChnageLog ChangeLog iab debain debian iab Debain Debian iab defualt default iab Defualt Default iab differnt different iab diffrent different iab emial email iab Emial Email iab english English iab hebrew Hebrew iab currect correct iab figth fight iab figther fighter iab fro for iab fucntion function iab ahve have iab homepgae homepage iab logifle logfile iab lokk look iab lokking looking iab mial mail iab Mial Mail iab miantainer maintainer iab amke make iab mroe more iab nwe new iab recieve receive iab recieved received iab erturn return iab retrun return iab retunr return iab seperate separate iab shoudl should iab soem some iab taht that iab thta that iab teh the iab tehy they iab truely truly iab waht what iab wiht with iab whic which iab whihc which iab yuo you iab databse database iab versnio version iab obnsolete obsolete iab flase false iab recrusive recursive iab Recrusive Recursive iab destribution distribution
pgpAVXGrZh82I.pgp
Description: PGP signature
