Geany4Windows文本编辑(Geany4Windows text editing)
我已经使用了Geany4Windows很长一段时间但我仍然困惑它如何处理编辑文本文件,我现在决定寻求帮助!
如果我从菜单中打开一个新文件,我可以在其中键入纯文本,但是当我保存文件时,它没有提供.txt扩展名选项来保存为,而我可以将其添加到我给予的名称的末尾。文件并保存,它保存为.txt文件没有问题。 如果相反,我不这样做,并取消文件扩展名,然后保存,它保存为没有扩展名的文件!
有一个选项可以打开一个新的模板文件但在我的Geany4Windows中没有.txt模板。 我尝试使用{fileheader}创建一个文件并将其保存在C:\ Program Files(x86)\ Geany \ data \ templates \ files中作为file.txt。
这样就可以选择打开一个新的模板文本文件但是当我保存文本文件头时会生成这个:
/* * mynewdefaulttexttemplateGeany.txt.txt * * Copyright 2014 Richard <Richard@RPDHPI5PAVILION> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * */My first text file from new text template I just created in Geany.....
文件头显示为>> mynewdefaulttexttemplateGeany.txt.txt <<,扩展名为.txt。
如果我可以为我的默认模板file.txt文件修复此文件头(因此它不会随着扩展名添加两次而保存),我会更乐意使用Geany4Windows中的纯文本文件! 有谁知道我可以解决这个问题吗? 谢谢。
我的编辑我现在已经解决了这个问题,下面马修斯的帖子对此有所帮助(见我的评论)。 回顾一下解决方案:我使用{fileheader}创建了一个新的自定义文件类型file.txt为了完成这项工作,我将行txt = * .txt添加到filetype_extensions.conf中我还创建了filetypes.txt.conf并添加了..
[settings] extension = txt lexer_filetype = C [styling = C] #dultiline comments comment_open = / * comment_close = * /这个现在有效! 查看之前和之后的屏幕截图:
后:
我喜欢Geany4Windows,但尝试自定义它以使用新的文件类型等会很有趣。在Windows和Linux上使用Geany进行快乐编码和编辑(它是否在Mac上运行?!)。 我很高兴现在已经修好了。 :-)
I have used Geany4Windows for a long while but am still confused how it handles editing text files and I decided to ask for help now!
If I open a new file from menu I can type plain text in it and yet when I save the file it does not give a .txt extension option to save as and while I can add this to the end of the name I give to the file and save it and it saves as a .txt file with no problem. If instead, I do not do this and leave off the file extension, and then save it, it saves as a file with no extension!
There is an option to open a new template file but in my Geany4Windows there is no .txt template. I tried making my own by making a file with a {fileheader} and saving it in C:\Program Files (x86)\Geany\data\templates\files as file.txt.
This does then give me the option to open a new template text file but when I save that the text fileheader produces this:
/* * mynewdefaulttexttemplateGeany.txt.txt * * Copyright 2014 Richard <Richard@RPDHPI5PAVILION> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * */My first text file from new text template I just created in Geany.....
The file header shows as >> mynewdefaulttexttemplateGeany.txt.txt << with a double .txt extension.
If I could fix this file header for my default template file.txt file (so it doesn't save with the extension added twice), I would be happier working with plain text files in Geany4Windows! Anyone know how I can fix this please? Thanks.
MY EDIT I have fixed this now and it was helped by Matthews post below (& see my comment on that). To recap the solution: I made a new custom file type file.txt with {fileheader} To make this work I added the line txt=*.txt to filetype_extensions.conf Also I created filetypes.txt.conf and added..
[settings] extension=txt lexer_filetype=C [styling=C] # multiline comments comment_open=/* comment_close=*/This works now! See screenshots before & after:
after:
I do like Geany4Windows but it can be interesting trying to customise it to use new filetypes etc etc. Happy coding & editing with Geany on Windows & Linux (does it run on Mac?!). I'm pleased this is fixed now. :-)
原文:https://stackoverflow.com/questions/21380063
最满意答案
相关问答
更多-
无法打开.msg文件(Can not open .msg files)[2023-05-29]
尝试这个: Sub OpenMSGRenameDownloadAttachement() Dim Msg As Outlook.MailItem Dim objAtt As Outlook.Attachment Set objOL = CreateObject("Outlook.Application") Set objNs = objOL.GetNamespace("MAPI") 'objNs.Logon inPath = "C:\January Messages\" outPath = "C:\Jan ... -
好。 如果有人会遇到同样的问题,我终于得到了答案。 首先应该是 Outlook.MailItem fld = (Outlook.MailItem) app.Session.OpenSharedItem("E:\\Projects\\C#\\message1.msg"); 区别在于斜线。 然后,您需要使其工作的是Outlook 2007或更新版本。 就是这样:] Ok. In case anybody will face the same problem finally I've got an answe ...
-
您正在从机器上安装Outlook并处于可运行状态? 错误在于com组件没有注册,这通常意味着你只是从另一台没有注册com的机器复制dll。 所以要么安装Outlook,要么安装它 https://www.microsoft.com/en-us/download/details.aspx?id=1004 I installed Outlook on my system. And the code I had posted above (Microsoft.Office.Interop.Outlook.Appl ...
-
第三种方法是以编程方式使用run .msg文件。 在这种情况下应该打开默认应用程序(outlook)。 例如: string file= @"C:\PWS\myMail.msg"; Process.Run(file); 请注意,您无法运行多个Outlook实例。 因此,邮件将在现有Outlook实例(如果有)中打开。 两种方法(#1和#2)都允许在Outlook中打开已保存的邮件。 但他们有微小的差异: Application类的CreateItemFromTemplate方法从Outlook模板(. ...
-
首先,为什么使用HTMLBody属性而不是纯文本Body? 其次,您可以使用MailItem.saveAs(...,olTxt)将消息另存为文本文件。 或者你的意思是txt文件的其他东西? 如果您的防病毒应用程序不是最新的,则Outlook会引发安全提示。 如果您无法控制代码运行的环境,那么扩展MAPi(仅限C ++或Delphi)或Redemption (任何语言)等包装器几乎是您唯一的选择。 有关详细信息,请参阅http://www.outlookcode.com/article.aspx?id=52 ...
-
C#Outlook interop和OpenSharedItem用于打开MSG文件(C# Outlook interop and OpenSharedItem for opening MSG files)[2021-12-14]
如何从vCard文件创建联系人项目并将项目保存到文件夹中 如何:使用OpenSharedItem导入已保存的项目 How to: Create a Contact Item from a vCard file and Save the Item in a Folder How to: Import Saved Items using OpenSharedItem -
此论坛帖子完全描述了您的问题 - 用户属性不会在MSG中持久存在 。 我也经历过微软在2007年改变的同样行为。 作为一种解决方法,我只使用隐藏的Outlook文件夹来存储我的MailItem与用户属性,而不是将其导出到磁盘并将其重新MailItem 。 如果您无法使用此解决方法,则可能需要使用EWS将其存储在共享邮箱中并以此方式访问“用户属性”,而不是将MSG导出到磁盘。 Ok I've found a solution that seems to works. For this, I need to u ...
-
这似乎与我的旧工作站及其Office安装有关。 我最近搬到了一个新的工作站,安装了全新的Windows和Outlook 2010,这个问题已经消失了。 It seems this was related to my old workstation and its Office install. I recently moved to a new workstation with a fresh Windows and Outlook 2010 install and this issue has disap ...
-
临时核心解决方案: public static class OutlookKiller { [DllImport("user32.dll", EntryPoint = "GetWindowThreadProcessId", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] private static ...
-
我注意到互操作库的版本11不包含OpenSharedItem()方法。 它从版本12开始可用。 看来这个操作在Office 11/2003上是不可用的(至少不能通过任何版本的互操作lib上的方法调用)。 我不确定这是否适合您的场景,但我在Outlook Redemption库中取得了很大的成功。 从什么是Outlook赎回? : Outlook Redemption解决Outlook安全修补程序强加的限制,并提供了许多对象和函数来处理未通过Outlook对象模型公开的属性和功能。 Redemption库还包 ...