1

我正在运行:Windows 7,gvim 7.4

把它放在我的 vimrc 中:

"------------dbext--------------
" Microsoft SQL Server
let g:dbext_default_profile_microsoft_production = 'type=SQLSRV:integratedlogin=1:dsnname=SQLOLEDB.1:srvname=SVR:extra=-t'

尝试使用和不使用“extra = -t”,结果相同: 在此处输入图像描述

这是我的整个vimrc:

set nocompatible
set number
set list
set noerrorbells visualbell t_vb=

"gui
set guifont=Consolas:h14
colorscheme blue

"tab and indent settings
set shiftwidth=2
set tabstop=2
set noexpandtab

"split windows
nnoremap <C-k> :exe "vertical resize +10"<CR>
nnoremap <C-j> :exe "vertical resize -10"<CR>

"NERDTree
set autochdir "set working dir to active buffer
let NERDTreeChDirMode=2 "set dir for NERDTree
nnoremap <leader>n :NERDTreeToggle .<CR>

"autocompletion
set omnifunc=syntaxcomplete#Complete
" SuperTab
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"
let g:SuperTabClosePreviewOnPopupClose = 1

"<Ctrl-l> redraws the screen, remove highlighting
set hlsearch

autocmd GUIEnter * set visualbell t_vb=

"directories
set backupdir=C:\G_Drive\code\vim\vimdir
set directory=C:\G_Drive\code\vim\vimdir


source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

"pathogen
filetype off "run pathogen before plugin config
execute pathogen#infect()
"call pathogen#runtime_append_all_bundles()
call pathogen#incubate()
call pathogen#helptags()
syntax on
filetype plugin indent on
filetype plugin on

"syntastic
let g:syntastic_check_on_open=1
let g:syntastic_enable_signs=1
" On by default, turn it off for html
"let g:syntastic_mode_map = { 'mode': 'active',
"   \ 'active_filetypes': [], }
"   \ 'passive_filetypes': ['html'] }
"let g:syntastic_jshint_exec='$HOME/AppData/Roaming/npm/jshint.cmd'
"let g:syntastic_jshint_exec='C:/Users/Drupal Intermediate/AppData/Roaming/npm/jshint.cmd'
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_html_checkers = ['w3']
let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']

"------------dbext--------------
" Microsoft SQL Server
let g:dbext_default_profile_microsoft_production = 'type=SQLSRV:integratedlogin=1:dsnname=SQLOLEDB.1:srvname=SVR:extra=-t'

set shell=powershell
set shellcmdflag=-command

"info bar
set laststatus=2
set statusline= 
set statusline+=file:\ %F%m%h%r\ %y\ \| 
set statusline+=buff:\ %n\| 
set statusline+=%=
set statusline+=\|row:\ %l\|col:\ %c%V 
set statusline+=\|\ %p%% 

"maps
nnoremap  p  :put<cr>
nnoremap <S-Space> :bn<cr>:syntax sync fromstart<cr>
nnoremap <silent> <C-l> :nohl<CR><C-l>
"nnoremap - mzI/* <esc>A */<esc>`z
nnoremap <C-Tab> :set tabstop=2<bar>set noexpandtab<bar>%retab!<cr>
4

1 回答 1

2

主角ÿþ们放弃了它;这是一个字节顺序标记(十六进制 0xFFFE),用于 16 位 Unicode 编码。Vim 没有正确检测到这一点。阅读:help 'fileencodings'以了解如何解决该问题,或者只是(重新)通过以下方式读取缓冲区

:edit! ++enc=ucs-2le
于 2014-03-07T14:14:49.807 回答