folding

How can you have folds for a LaTeX file in XEmacs?

只谈情不闲聊 提交于 2019-12-23 03:11:28
问题 I would like to have automatic folds for comments in my AquaEmacs. 回答1: have a look at hs-minor-mode. it's not automatic though. for a more automatic approach, i guess you could customize the hideshow mode the following way: hide comments via hs-hide-comments-when-hiding-all assign a function which hides nothing to hs-hide-all-non-comment-function and then use hs-hide-all to hide all comments. have not tried it. just an idea. check out the hideshow mode page at emacswiki as well. 回答2: You

How to collapse concealed text?

戏子无情 提交于 2019-12-22 10:05:46
问题 The problem is as follows: This is about a plain .txt file I have enabled the conceal feature and created this syntax file: set conceallevel=3 syn region cTest conceal start='€£' end='£€' hi cTest ctermfg=DarkYellow I write first a summary/skeleton of what I want to say, and put it in between €£ and £€. Then, in the same line, I write a lengthier text following the guidelines of the summary. The whole file contains many (>100) lines. The conceal feature works very nicely, except for one point

A text editor that auto-folds parentheses?

邮差的信 提交于 2019-12-22 01:41:02
问题 I have some big messy SQL procedures that I'm debugging, and they tend to have a lot of heavily nested parentheses: SELECT * FROM (SELECT F1,F2 FROM TABLE1 AS X LEFT JOIN (SELECT F9,F8 FROM (SELECT F13,F14 FROM TABLE4) AS J INNER JOIN TABLE3 ON...) AS B ON X.F1=B.F9) AS X1 I'm looking for an editor that can automatically mark and optionally collapse/fold each parentheses set to ease reading, e.g. SELECT * FROM ... AS X1 SELECT * FROM (SELECT F1,F2 FROM TABLE1 AS X LEFT JOIN ... AS B ON X.F1=B

Emacs persistent folding mode

北城余情 提交于 2019-12-21 07:15:36
问题 There are plenty of ways to fold code in Emacs and I've settled in on using the outline minor mode... it works great! However, I really want my folding to be persisted when I close and re-open files. It is quite frustrating to have folding set up in a file the way I like it, only to have that lost when I restart Emacs. Has anyone found a way to keep the folding state of a file persistent? 回答1: Edit: Now that I understand the question... How about something like the following nippet of code.

How can I fold .cs files inside .xaml files in Visual Studio 2010?

Deadly 提交于 2019-12-19 05:14:09
问题 How can I put my ViewModel file (a .cs file) folded inside its corresponded View file (a .xaml file) file like in the image? 回答1: I don't know of a way to do it in visual studio, but you can edit your .csproj file in a text editor. You should find something like this: <Page Include="MainWindow.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Compile Include="MainWindow.xaml.cs"> <DependentUpon>MainWindow.xaml</DependentUpon> <SubType>Code</SubType> </Compile>

Code folding for LaTeX in Emacs

≡放荡痞女 提交于 2019-12-18 12:57:10
问题 Is there an Emacs minor-mode (or piece of elisp code) that lets you selectively hide/show environments while in LaTeX mode? For instance, I would like to move to the beginning of a long \begin{figure} block, hit a keystroke, and have the contents of that figure environment hidden from view. Similarly with \begin{proof} and so on, and ideally even with \subsection s. Is this possible? I just tried hs-minor-mode , allout-mode , and outline-minor-mode , but most of them don't recognize LaTeX's

Confusion about vim folding - how to disable?

ε祈祈猫儿з 提交于 2019-12-18 10:00:43
问题 When I open the file it looks like this: or even this When I open all folds, they are closed again when I navigated to another buffer and came back. To be able to work with it, I have to apply zR each time when opening a buffer. I have these set up in .vimrc : set foldlevelstart=99 set foldlevel=99 Please point me on how to disable the folding, or at least making the navigation to another buffer not to close the opened ones. 回答1: You're not alone. set nofoldenable " disable folding 回答2: The

Java equivalent to #region in C#

℡╲_俬逩灬. 提交于 2019-12-17 03:21:31
问题 I want to use regions for code folding in Eclipse ; how can that be done in Java? An example usage in C#: #region name //code #endregion 回答1: There's no such standard equivalent. Some IDEs - Intellij, for instance, or Eclipse - can fold depending on the code types involved (constructors, imports etc.), but there's nothing quite like #region . 回答2: Jet Brains IDEA has this feature. You can use hotkey surround with for that (ctrl + alt + T). It's just IDEA feature. Regions there look like this:

Folding over a list of Options to Find First or Last Some

痞子三分冷 提交于 2019-12-13 12:05:10
问题 I'm trying to fold over a list of Options in order return the first(or last) Some value or None if there aren't any Some values. scala> val opts = List(None, Some(1), None, Some(2), None) opts: List[Option[Int]] = List(None, Some(1), None, Some(2), None) scala> opts foldLeft(None)((a,io) => a match { case None => io; case Some(i) => a}) <console>:9: error: object None does not take parameters opts foldLeft(None)((a,io) => a match { case None => io; case Some (i) => a}) ^ Not sure what I'm

Text folding in matlab is not working

℡╲_俬逩灬. 提交于 2019-12-12 13:19:52
问题 Text folding is not working in my matlab 2013. I enabled everything in preferences Editor/Debugger, but still no luck. Below is an example of what I am trying to fold. test = 5; %% t =7; %% 回答1: What did you enable in the preferences? In R2013a you should go to Preferences > Editor/Debugger > Code Folding and click the Enable checkbox for Sections that is off by default. Then click Apply or OK . Here's an annotated screen capture of Code Folding pane of my preferences: You should see a little