如何为文件设置特定的输入法 [英] How to set a specific input method to a file

查看:112
本文介绍了如何为文件设置特定的输入法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用多种语言编写,我想为不同的文件定义不同的输入法。有没有办法做到?

I write in several languages, and I would like to define a different input method for different files. Is there a way to do this?

(例如,设置一个特定的字典,在文件的末尾,我写以下内容:

(For example, to set a specific dictionary, at the end of a file I write the following:

<!-- Local IspellDict: british -->

我可以对输入法做类似的事情吗?)

Can I do something similar for input methods?)

推荐答案

您可以在文件的开头:

-*- eval: (activate-input-method 'latin-4-postfix); -*-

或在文件末尾:

Local Variables:
eval: (activate-input-method 'latin-4-postfix)
End:

在任何一种情况下,如果主模式具有注释语法,则可以/应该注释行。

In either case, you can/should comment the lines if the major mode has a comment syntax.

如果您只想选择在键入 C-\ 时启用的输入法,则代替:

If you just want to select which input method will be enabled if you type C-\ then instead of:

eval: (activate-input-method 'latin-4-postfix)

您将使用:

default-input-method: latin-4-postfix

这篇关于如何为文件设置特定的输入法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆