customization

Remapping :Wq to :wq in vim

房东的猫 提交于 2019-11-30 03:00:37
问题 A lot of times, when I want to save a file in vim and immediately exit thereafter, I accidentally type :Wq instead of :wq. Vim naturally gives me this error: E492: Not an editor command: Wq I'm wondering, is it possible to remap :Wq to :wq? 回答1: You can create a simple vim command that is basically an alias for wq . Place the following in your ~/.vimrc file: command! Wq wq For more help see: :h :command 回答2: You can also use ZZ which is the same as :wq<CR> 回答3: Though abbreviations suggest

Is there a way to disable or modify Xcode's code completion?

不羁岁月 提交于 2019-11-30 02:09:22
问题 I have unchecked both "Show arguments in pop-up list" and "Insert argument placeholders for completions" in Xcode Code Sense preferences, but when I type "else" (for example) in the editor, Xcode still dumps in a pre-formatted "else" block. Is there a way to disable this feature entirely, or (better yet) to modify the block that Xcode inserts? The default Xcode "else" block doesn't match my coding style, so the placeholder actually hampers my productivity instead of helping. UPDATE: I just

Value cannot be null. Parameter name: value, CreateIdentityAsync?

眉间皱痕 提交于 2019-11-30 01:44:03
I created a ViewModel( UserModel ) that implement IUser<int> (for customizing ASP.NET Identity 2.0) public class UserModel : IUser<int> { public int Id { get; set; } public string SecurityStamp { get; set; } [Display(Name = "Name")] public string FirstName { get; set; } [Display(Name = "Last Name")] public string LastName { get; set; } public string FullName { get; set; } [Display(Name = "Username")] public string UserName { get; set; } [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } [Display(Name = "E-Mail")] public string Email { get; set; }

Can I assign a global hotkey to an Adobe AIR app?

一世执手 提交于 2019-11-30 01:39:02
问题 Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray). 回答1: I don't this it's possible with Adobe AIR itself. The only method I can think of: Install 3rd party hotkey application (like AutoHotkey or HotKeyBind) Configure hotkey application to make CTRL+ALT+Q to launch " c:\programs\thvo42\coolapp.exe --hotkey q " In your AIR

Custom Progress bar Android [closed]

回眸只為那壹抹淺笑 提交于 2019-11-30 00:52:25
I want to use this type of Progress bar in android. I have tried with many horizontal progress bars. They are all looking like default progress bars with different colors. Dont know how to use this type: Kumar Bibek You will need to create your own custom progress bar. It's not as simple as using many horizontal bars. Customizing a progress bar requires defining the attribute or properties for background and and progress of your progress bar. create a.xml file named customprogressbar.xml in your res-> drawable folder customprogressbar.xml <layer-list xmlns:android="http://schemas.android.com

Android Listview Custom Section Header

China☆狼群 提交于 2019-11-29 23:23:10
How can i implement custom section or header of ListView like Instagram app in android. http://prsarahevans.com/wp-content/uploads/2011/06/photo.PNG When scroll up the bar that have userpic, name and time still be there and when other header bar go near it then animate like push it up. Thank you. I was able to solve this issue by using scroll listener on the listview. (tested on 2.1) Lets say for each list row I have a layout like the one below. There is a content part and a header part. It doesn't matter what view type you use for header or content. <?xml version="1.0" encoding="utf-8"?>

Customizing Syntax Highlighting in Vim

这一生的挚爱 提交于 2019-11-29 23:03:23
问题 How I can keep all the current formatting for a file type but add functionality . I would like to highlight colors in .vim files so that each color is highlighted how the terminal will resolve it. I created a vim.vim file containing: syn keyword yellow yellow containedin=All highlight yellow ctermfg=yellow syn keyword red red containedin=all highlight red ctermfg=red and put it into ~/.vim/after/syntax/vim.vim As suggested here. This has no effect. Update In fact I was mistaken when I said my

Customize UIAlertController in iOS 8 to include standard elements like UITableView

不羁的心 提交于 2019-11-29 22:24:21
I am used to customize UIAlertViews through the [ alert setValue:someView forKey:@"accessoryView"] method. This creates customizable content for UIAlertViews with custom heights. However it only works on iOS7 and down. In iOS8 the UIAlertController have taken over, and I cannot customize it anymore, it will cut the height of the UIAlertView . Is it impossible because of misuse of the UIAlertController , or how am I supposed to do it? I am trying to incorporate a UITableView inside a UIAlertController with UIAlertControllerStyleAlert . Thx. I ran into the same issue right now. I looked at the

Line completion with custom commands

柔情痞子 提交于 2019-11-29 21:32:29
my Python program can be launched with a range of different options (or subcommands) like: $ myProgram doSomething $ myProgram doSomethingElse $ myProgram nowDoSomethingDifferent I want it to use auto-completion with so that if i type "myProgram d" it returns "myProgram doSomething" and if i type "myProgram n" it renders "myProgram nowDoSomethingDifferent". This is similar to the average use of the module rlcompleter , but it does not pick possible completion options from the filesystem (or from history) but from a custom set of strings (that correspond to the available options for my program)

How to keep Twitter Bootstrap customization with Bower?

一世执手 提交于 2019-11-29 20:38:03
I'm working in a project with yeoman which includes grunt for automation and bower for client-side package management. One of the dependencies of my project is SASS twitter-bootstrap . In other projects, in which I manually managed the updates of dependencies, I changed Bootstrap values directly in the Bootstrap variables.less ( _variables.scss ) file and extend it in main.less files under the project own css folder. I did the same here, but when I installed other packages with Bower it overrode everything (I "un-.gitignored" my components' folder, thanks God) What's the best way to customize