How to customize default "Lorem ipsum" snippet in Sublime Text 3? - sublimetext

Default "Lorem ipsum" snippet in Sublime Text 3 is generating a paragraph with line breaks. I installed another lorem snippet from joshnh/HTML-Snippets, but now I have two snippets acting on "lorem"+<tab>. How do I customize/disable/remove default lorem snippet?
Update: installing "Emmet" package did what I want (has overridden the keymap "lorem"+<tab>), but the default snippet is there and I wonder if I could customize it.

Strangely, the Lorem ipsum snippet is in the Plain Text package, with scope -source, meaning it works everywhere except source code files. Since HTML is scope text.html.basic, it works there.
To get rid of it in Sublime Text 2, click on Preferences -> Browse Packages... to open the Packages folder. Go to the Text folder and delete the file lorem.sublime-snippet. If you just want to edit it, open the file with XML syntax and have your way with it.
Packages in Sublime Text 3 are by default kept in zipped .sublime-package files, so you can't just outright delete the file - instead you'll have to mask it. To completely disable it, open the Packages folder as above, and create a folder called Text (make sure it's capitalized on case-sensitive file systems). Inside text, create an empty file called lorem.sublime-snippet, and you'll be all set. If you want to edit the snippet, its original contents are as follows:
<snippet>
<description>Lorem ipsum</description>
<content><![CDATA[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]></content>
<tabTrigger>lorem</tabTrigger>
<scope>-source</scope>
</snippet>
Alternatively, you can install the excellent PackageResourceViewer plugin. It allows you to extract the contents of .sublime-package files into the Packages folder, or you can view (and edit, if you wish) individual files. Once installed, open the Command Palette and type prv for PackageResourceViewer. There are two options by default: Extract Package and Open Resource. If you're just editing a single file, choose Open Resource, then navigate through the file tree until you find it. If you save changes, PRV will create a new folder in Packages with the package's name, and the file inside it. This will override the default package, so be careful when upgrading.
As you found, Emmet has its own version of Lorem ipsum, and like most things in Emmet is better than the original - you can customize how much you want, paragraph breaks, repeats, etc. If you haven't found it already, http://emmet.io has all the documentation.

Related

BND ignores ".impl." packages

According to a comment to answer related to BND, it does not export packages named ".impl.":
ok, never mind. I found that some packages were named ".impl." in the code, and BND does not export them by default. I renamed the packages and this solved this particular problem. look like the error message wasn't too specific. – Alex Sep 12 '11 at 19:20
Is there a reliable way to make BND always export those packages for wildcard exports like foo.*?
That is not a Bnd thing. That is a maven-bundle-plugin thing. maven-bundle-plugin configures Bnd with some behavior.

How to exclude a file in war with gradle

My build.gradle includes the following (in addition to other stuff):
war {
from("src/main/application") {
into("WEB-INF/application")
}
}
Along the way, it copies src/main/webapp into the root of the war file. Cool. Problem is I have one file that I’d like it to exclude from that copy. Let’s call it abc.jar. How can I make gradle continue to do everything it’s doing when creating a war file but exclude abc.jar from being copied from src/main/webapp to the root of the war file?
Thanks!
Blake McBride
You can try this,
war {
rootSpec.exclude("**/abc.jar")
}

How To Create Different Flavor Of Build with Maven

I wants to build my anndroid project with maven.
There are 3 projects
Project - A (jar file )
Project - B (jar file )
Project - C (sdk package)
Project C is depended on B
Project B is depended on A
With maven I wants to release two flavor of by build
1st flavor : Release JAR from B (which contain code from B & A)
2nd flavor : Release SDK from C (which contain code from C & B & A)
Can I control this behaviors from MAVEN.
For the "1st flavor", you can use the maven-assembly-plugin with the predefined desriptor jar-with-dependencies that will embed all the dependencies into your project's jar, but pay attention to the transitive dependencies that could be embedded into it also. Otherwise you can also use the maven-shade-plugin which is having options that you could be interested in like minimizeJar and an easier way to configure of includes and excludes (see doc here).
For the "2nd flavor", the use of the maven-assembly-plugin would fit well with its bin descriptor or by defining your own descriptor if you need to include other files (see the descriptor format here). You can find a few examples on how to configure and use the maven-assembly-plugin for that on SO (you can also look at the questions I already answered about this plugin)

In bndtools, what causes a Require-Capability header for execution environment to be generated?

I have the following bnd file:
Bundle-Version: 1.0.12
Bundle-Activator: a.b.Activator
Private-Package: a.b
-buildpath: osgi.core;version=4.3.0,\
org.apache.felix.bundlerepository;version=1.6.6,\
osgi.cmpn;version=4.3.0.201111022214
-sources: false
In the generated MANIFEST.MF:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
I don't want this there... there's no reason I can see that it should be. So how do I avoid it?
bnd 2.3 automatically adds this. You can disable with -noee=true in your bnd file.
Generally this is a good requirement to have since it expresses the base JRE requirement of your bundle. bnd determines the version based upon the class file versions in the bundle.

what is the use of webapp-cache.xml?

what is the use of webapp-cache.xml? Does it cache any data like images, htmls etc..?? I can see that it gets created after maven build, however I could not understand the importance of this webapp-cache.xml.
Taken from the Maven WAR Plugin Docs
cacheFile:
The file containing the webapp structure cache.
Type: java.io.File
Since: 2.1-alpha-1
Required: Yes
Default: ${project.build.directory}/war/work/webapp-cache.xml
The WAR plugin uses this file in the process of creating the WAR file.

Resources