1
голосов
5ответов
225 просмотров

Какие плагины для фрагментов кода доступны для VS2008?

Мне нужен редактор фрагментов кода для VS2008. Я хотел бы просто нажать горячую клавишу, вызвать редактор, ввести свой фрагмент, перейти к точке останова и пройти через него. Я не хочу создавать проект, создавать xmlфайл , или даже сохранить свой файл, если я не хочу этого. Я просмотрел...

17
голосов
2ответов
21935 просмотров

Как включить фрагмент кода в презентацию проектора?

Как лучше всего включить некоторые фрагменты кода в презентацию Beamer? Я уже пробовал среды verbatim и lstlisting - обе разрушили мою презентацию.

16
голосов
3ответов
6713 просмотров

С VIM используйте одновременно и snipMate, и pyiction (поделитесь ключом <tab>?)</tab>

Я пытаюсь использовать snipMate и pyдикция в vim вместе - однако оба используют ключ &lt;tab&gt; для выполнения своего гениального автозаполнения-snippet-rendering-goodness-that-I-so-desire. Когда установлен pydiction, snipMate перестает работать.Я предполагаю, что это потому, что они не ...

6
голосов
3ответов
2496 просмотров

Как создать экземпляр stdClass на месте

Можно ли это сделать на php? Код Javascript: var a = {name: "john", age: 13}; //a.name = "john"; a.age = 13 Создать экземпляр переменной stdClass "на лету"?

4
голосов
2ответов
454 просмотров

Кто изобрел дзен-кодирование и есть ли где-нибудь опубликованная спецификация?

Фон: «Дзен-кодирование» - это, по-видимому, название стиля ввода текста в среде IDE или редакторе, с помощью которого пользователь может вводить небольшие сокращения, которые расширяются в HTML. Это не обязательно новая идея, это просто доработка старой, которую поддерживают многие редактор...

0
голосов
2ответов
114 просмотров

может ли кто-нибудь объяснить мне этот фрагмент javascript textmate мне, пожалуйста

следующий код представляет собой фрагмент javascript textmate. Кто-нибудь может его объяснить?Потому что я хочу использовать эту функцию в своих собственных фрагментах.большое спасибо. document.getElement${1/(T)|.*/(?1:s)/}By${1:T}${1/(T)|(I)|.*/(?1:agName)(?2:d)/}("$2")

3
голосов
2ответов
677 просмотров

Get filename without extension, textmade bundle editor

Thought this might work: ${TM_FILENAME/(.+?)(\.[^.]*$|$)/} But it's giving me this error: Error Parsing Snippet line 1:257: expecting regexp options, found '' Any tips?

3
голосов
1ответов
1400 просмотров

Replace text in a Visual Studio Code Snippet Literal

Is it possible to replace text in a Visual Studio Snippet literal after the enter key is pressed and the snippet exits its edit mode? For example, given a snippet like this: public void $name$ { $end$ } If I were to enter $name$ as: My function name is it possible to have Visual Stu...

1
голосов
3ответов
544 просмотров

How can I add the "--watch" flag to this TextMate snippet?

I love TextMate as my editor for all things web, and so I'd like to use a snippet to use it with style.less files to automatically take advantage of the .less way of compiling .css files on the fly using the native $ lessc {filepath} --watch as suggested in the less documentation (link) My (t...

7
голосов
3ответов
451 просмотров

Snippets for productivity - collect good code

I was wondering whether there're recommendable sites, that host collections of good and useful code-snippets. Searching stackoverflow, to be honest, sometimes is priceless. - But if you know sites like commandlinefu (just for Shell stuff), you may also want something like that for Ruby, Java, ...

0
голосов
1ответов
48 просмотров

A VS 2008 code snippet doesn't get inserted fully

I have the Javascript one liner below as a code snippet in VS 2008 SP1. When I insert it in the code (C#) window, only 'var SelectedVal =' gets inserted, instead of the whole statement. Also.. is there a way to get the Insert Snippet to show up in the context menu when in aspx editor window? Co...

2
голосов
2ответов
122 просмотров

Can we make this snippet groovier?

are there any improvements where i can improve this code? Maybe there are some groovy language features? This snippet flattens a xml file to: node/node/node def root = new XmlParser().parse("src/your_xml.xml") root.depthFirst().each { n -&gt; def name = n.name() while(n?.parent()){ ...

2
голосов
3ответов
255 просмотров

Is there a way in C# to access object properties in old, Pascal "with" keyword way?

This is the Pascal sample I want to achieve in C#: With myBook do Begin Title := 'Some Book'; Author := 'Victor John Saliba'; ISBN := '0-12-345678-9'; Price := 25.5; End;

0
голосов
2ответов
1072 просмотров

Insert a snippet from a Visual Studio macro

I have a situation where I want to run a Visual Studio macro that has the user type something in an InputBox, then inserts a snippet and includes that text somewhere in it. Unfortunately, I can't figure out how to insert the snippet from macro code. It seems like it'd be something like DTE.Exe...

0
голосов
1ответов
247 просмотров

How to write my own Global Snippets program with .NET?

I want to write my own global snippets tool for Windows XP and higher. This would be an always running in the background tool that would pop-up on a globally-defined hotkey, allow me to select a snippet with substitution arguments, and then paste the expanded snippet into the text input of whate...

4
голосов
7ответов
3476 просмотров

Open source code snippet repository

Does anyone know of a good and simple open source code snippet repository? Ive seen many that are free services, but I want to host it myself. A few google searches just find the free services.

0
голосов
1ответов
89 просмотров

Code Snippet can't be added to snippet library in Visual C# Express '08

This snippet is added fine: http://pastebin.com/m5f7f2dce And this is the one I'm trying to add into my IDE: http://pastebin.com/m61321572 But I recieve an "invalid snippet" error. I don't see anything different about the two except for the declaration area. Any help?

2
голосов
1ответов
6865 просмотров

How to use sphinx plugin for MySQL to implement fulltext search with PHP?

Can someone provide a demo here? And how to retrieve the matching snippet at the same time?

5
голосов
3ответов
162 просмотров
4
голосов
3ответов
507 просмотров

Displaying code snippets in WordPress

Ok, not technically a programming question but I want a plugin for my WordPress blog that displays code snippets. Can anyone here recommend a good one? Also, do you guys know which one Jeff uses on codinghorror. That one looks really good. Thanks.

6
голосов
4ответов
5302 просмотров

How to generate the snippet like those generated by Google with PHP and MySQL?

For example, it just returns the snippet around which the searching keyword exists. And part of the text is replaced by "...". Is it possible to achieve that goal with PHP and MySQL?

2
голосов
6ответов
3560 просмотров

Code snippet library for a team

I would like a general purpose code snippets library, that I could use to store bits of code for any language, organized in folders. When any developer on the network adds a snippet, it should get transferred to others. How can I do this simply? Any app that could be used for sharing libraries o...

0
голосов
1ответов
549 просмотров

Visual Studio 2008 Team System Upgrade Removes Code Snippets

I've been using VS 2008 for several months now and received a copy of VSTS 08 from work and installed without any issues. I upgraded VS 08 to VSTS 08 by running the VSTS installer without uninstalling VS 08. A few hours of after the install, I attempted to create a snippet in a VB project (Try Ca...

1
голосов
1ответов
1155 просмотров

Lift: how to retrieve the current logged in user?

I'm starting to learn Lift and I'm stuck. I have problem with simple snippet: class Util { def in(html: NodeSeq) : NodeSeq ={ if (User.loggedIn_?) Helpers.bind("user", html, "name" -&gt; User.currentUser.map(_.lastName).open_!) else NodeSeq.Empty ...

8
голосов
8ответов
5798 просмотров

Very simple map implemention in C (for caching purpose)?

I have a program that read urls in a file and does a gethostbyname() on each URL host. This call is quite consuming. I want to cache them. Is there a very simple map-base code snippet in C out there that I could use to do the caching? (I just don't want to reinvent the wheel). It has to have t...

2
голосов
1ответов
1600 просмотров

Multiple CodeSnippet in an XML .snippet file

I'm attempting to supplement the help features for my code by providing other developers with code snippets. These produce skeletons of code which demonstrate how to use/call my classes or methods. I've created a .snippet file and have placed it in the "%Visual Studio Folder%\Code Snippets\Visua...

44
голосов
6ответов
80877 просмотров

How to determine whether a string is valid JSON?

Does anyone know of a robust (and bullet proof) is_JSON function snippet for PHP? I (obviously) have a situation where I need to know if a string is JSON or not. Hmm, perhaps run it through a JSONLint request/response, but that seems a bit overkill.

19
голосов
3ответов
4973 просмотров

Can I define custom "surround with" templates in Visual Studio 2008?

Can I define custom "surround with" templates in Visual Studio 2008?

5
голосов
3ответов
2424 просмотров

Creating a new Guid inside a code snippet using c#

I want to make an intellisense code snippet using Ctl K + Ctl X that actually executes code when it runs... for example, I would like to do the following: &lt;![CDATA[string.Format("{MM/dd/yyyy}", System.DateTime.Now);]]&gt; But rather than giving me that string value, I want the date in the...

3
голосов
2ответов
5838 просмотров

How to add date into C# snippet

I would like to add to my c# Visual C# Express (no macros) snippet current date and time tag. How to do it? When I will use intellisense to create code with this snippet I would like to have current date and time put into code.