Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Issue 5718045: code review 5718045: misc/vim: restore fileencodings. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by mattn
Modified:
14 years, 2 months ago
Reviewers:
CC:
golang-dev_googlecode.com, dsymonds, golang-dev
Visibility:
Public.

Description

misc/vim: restore fileencodings. Currently, ftdetect/gofiletype.vim set fileencodings to open the file as utf-8 encoding event if the file does not contain multibyte characters. But fileencodings is global option. $ vim foo.txt :set fileencodings utf-8,ucs-bom,cp932 $ vim foo.go :set fileencodings utf-8 This change restore fileencodings before opening the file. Also added specify fileformats=unix.

Patch Set 1 #

Patch Set 2 : diff -r a1838a690f0a http://go.googlecode.com/hg/ #

Patch Set 3 : diff -r a1838a690f0a http://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r 8328e5baaf10 http://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M misc/vim/ftdetect/gofiletype.vim View 1 2 3 1 chunk +23 lines, -1 line 0 comments Download

Messages

Total messages: 16
mattn
Hello golang-dev@googlecode.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to http://go.googlecode.com/hg/
14 years, 3 months ago (2012-03-02 02:54:31 UTC) #1
dsymonds
Would it be better to replace "fileencoding=utf-8" with "encoding=utf-8" (and force fileencoding to be empty)? ...
14 years, 3 months ago (2012-03-02 06:45:39 UTC) #2
mattn
> On Friday, March 2, 2012 3:45:39 PM UTC+9, David Symonds wrote: > Would it ...
14 years, 3 months ago (2012-03-02 07:51:53 UTC) #3
dsymonds
On Fri, Mar 2, 2012 at 6:51 PM, mattn <mattn.jp@gmail.com> wrote: > No. Many japanese ...
14 years, 3 months ago (2012-03-02 07:57:27 UTC) #4
mattn
> cp932 is not a valid representation of Go source code, which is > defined ...
14 years, 3 months ago (2012-03-02 08:35:02 UTC) #5
mattn
ping
14 years, 3 months ago (2012-03-08 05:51:42 UTC) #6
dsymonds
Sorry, I haven't forgotten about this. I've just been away. I'll study this closer tomorrow.
14 years, 3 months ago (2012-03-08 05:57:55 UTC) #7
dsymonds
I'm still not comfortable with this yet. Something that is bugging me is that this ...
14 years, 3 months ago (2012-03-09 13:09:00 UTC) #8
mattn
> I'm still not comfortable with this yet. Something that is bugging me > is ...
14 years, 3 months ago (2012-03-13 08:42:41 UTC) #9
dsymonds
On Tue, Mar 13, 2012 at 7:42 PM, mattn <mattn.jp@gmail.com> wrote: > Someone may use ...
14 years, 3 months ago (2012-03-13 12:10:00 UTC) #10
mattn
> Is there a way to change the encoding for a particular buffer? If so, ...
14 years, 3 months ago (2012-03-13 16:21:32 UTC) #11
dsymonds
On Mar 14, 2012 3:20 AM, "mattn" <mattn.jp@gmail.com> wrote: > > Is there a way ...
14 years, 3 months ago (2012-03-13 22:06:49 UTC) #12
dsymonds
One other thing to try: ++enc allows overriding fileencoding on a per-file basis. Is there ...
14 years, 3 months ago (2012-03-14 04:36:41 UTC) #13
mattn
> One other thing to try: ++enc allows overriding fileencoding on a per-file basis. Is ...
14 years, 3 months ago (2012-03-14 06:28:01 UTC) #14
dsymonds
LGTM
14 years, 3 months ago (2012-03-14 06:29:19 UTC) #15
dsymonds
14 years, 3 months ago (2012-03-14 07:43:09 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=ca61f2a46162 ***

misc/vim: restore fileencodings.
Currently, ftdetect/gofiletype.vim set fileencodings to open the file as
utf-8 encoding event if the file does not contain multibyte characters.
But fileencodings is global option.

$ vim foo.txt
:set fileencodings
utf-8,ucs-bom,cp932

$ vim foo.go
:set fileencodings
utf-8

This change restore fileencodings before opening the file.
Also added specify fileformats=unix.

R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/5718045

Committer: David Symonds <dsymonds@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b