Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the EditorConfig. #31

Closed
chusiang opened this issue Jul 24, 2019 · 11 comments
Closed

Support the EditorConfig. #31

chusiang opened this issue Jul 24, 2019 · 11 comments
Assignees

Comments

@chusiang
Copy link
Owner

目前的 vimrc 會造成 EditorConfig 無法作用,並已在乾淨的 Vim 環境確認為組態的問題。這下得一個一個設定檔慢慢試,麻煩了。

@chusiang chusiang self-assigned this Jul 24, 2019
@wenlixiao
Copy link

wenlixiao commented Jul 24, 2019 via email

@chusiang
Copy link
Owner Author

chusiang commented Jul 24, 2019

Enable the debug mode

We can use EditorConfig_verbose args to debug.

https://github.com/editorconfig/editorconfig-vim/blob/master/doc/editorconfig.txt#L131

                                             *g:EditorConfig_verbose*
 Set this to 1 if you want debug info printed:
 >
  let g:EditorConfig_verbose = 1
 <
  1. Add let g:EditorConfig_verbose = 1 into the vimrc.

    $ vim ~/.vimrc
    ...
    
    let g:EditorConfig_verbose = 1
    
  2. See the debug message at open file.

    Screen Shot 2019-07-24 at 14 35 17

@chusiang
Copy link
Owner Author

chusiang commented Jul 24, 2019

Troubleshooting

  1. After I mark the filetype indent on args in _vim/01.vimrc.vim, the EditorConfig is working !

    filetype indent on

  2. If this change has no be applied, please remove /tmp/vim-view/* files for remove saved folds.

    " save folds

    $ rm -rf /tmp/vim-view/
    =+private=+var=+folders=+gl=+b72y4zc91pl8_t8l6ch0l34r0000gn=+T=+tmp_github.com_2uwoo9o6=
    =+private=+var=+folders=+gl=+b72y4zc91pl8_t8l6ch0l34r0000gn=+T=+tmp_github.com_8go7lh82=
    =+private=+var=+folders=+gl=+b72y4zc91pl8_t8l6ch0l34r0000gn=+T=+tmp_github.com_tri3l4pd=
    ...
    vim-view/
    ~=+.bashrc=
    ~=+.vim=+01.vimrc.vim=
    ~=+.vim=+09.plugins.vim=
    ~=+.vim=+bundle=+.cache=+.vimrc=+.dein=+doc=+editorconfig.txt=
    ~=+.vimrc=
    ~=+vcs=+2.docker=+ansible-jupyter=+README.md=
    ~=+vcs=+2.docker=+ansible=+.editorconfig=
    ~=+vcs=+2.docker=+ansible=+README.md=
    ...
    
  3. Use ag to search filetype indent on under this project.

    [ chusiang@gundam ~/.vim ] - 14:44
    $ ag 'filetype indent on'
    01.vimrc.vim
    71:"filetype indent on
    
    bundle/repos/github.com/chusiang/vimcdoc-tw/doc/filetype.twx
    76:     :filetype indent on
    104::filetype indent on         開啟    未改變  開啟
    
    bundle/repos/github.com/chusiang/vimcdoc-tw/doc/usr_30.twx
    256:    :filetype indent on
    
    bundle/repos/github.com/chusiang/vimcdoc-tw/doc/version6.twx
    490:":filetype indent on" 命令允許使用提供的縮排指令碼。使用者手冊有解釋: |30.3|。
    
    bundle/repos/github.com/plasticboy/vim-markdown/test/vimrc
    12:filetype indent on
    
    bundle/repos/github.com/Shougo/dein.vim/autoload/dein/autoload.vim
    313:    silent! filetype indent on
    

I will disable it first.


Reference:

@chusiang
Copy link
Owner Author

chusiang commented Jul 24, 2019

Hi @wenlixiao ,

Vim 有許多套件 (plugin) 會用到 unix-like 的 libray,在 Windows 的環境很容易出問題,建議還是在 VM (虛擬機器) 或 Docker Container (容器) 底下,跑 Linux 的 Vim 會比較好。

加油。

@wenlixiao
Copy link

wenlixiao commented Jul 24, 2019 via email

chusiang added a commit to chusiang/php7.ansible.role that referenced this issue Jul 24, 2019
chusiang added a commit to chusiang/helloworld.ansible.role that referenced this issue Jul 24, 2019
chusiang added a commit to chusiang/php7.ansible.role that referenced this issue Jul 24, 2019
chusiang added a commit to chusiang/switch-apt-mirror.ansible.role that referenced this issue Jul 24, 2019
chusiang added a commit to chusiang/ansible-book-for-it-examples that referenced this issue Jul 24, 2019
chusiang added a commit that referenced this issue Jul 24, 2019
I am not use Windows to be my workstation over 10 year, so I remove some
batch and setting first.

> #31 (comment)
@chusiang
Copy link
Owner Author

@wenlixiao
Copy link

wenlixiao commented Jul 25, 2019 via email

@chusiang
Copy link
Owner Author

Hi @wenlixiao ,

敝人的是搞基礎建設 (infrastructure)、維運 (Operation)、持續整合 (Continuous Integration)、持續交付 (Continuous Delivery)、監控 (Monitoring) ... 的。以前是系統工程師;今年則被人稱作 SRE 或 DevOps Engineer。

對我們來說,Git、Docker 都算在必備的技藝之一喔!

@wenlixiao
Copy link

wenlixiao commented Jul 25, 2019 via email

@chusiang
Copy link
Owner Author

Hi @wenlixiao ,

很高興敝人的小小 Ansible 和 Vim 心得可以幫上您的忙。一起為今天的「提早下班」努力吧!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants