PyCharm2016.3使用贴士及安装和汉化

来源:互联网 发布:云顶娱乐软件下载 编辑:程序博客网 时间:2024/05/04 16:15

Tips.

  • 要快速找到一个菜单命令或工具栏的动作,你不需要通过菜单。只需按下Ctrl Shift A(帮助|找到主菜单动作)开始输入动作的名称。从建议列表中选择所需的动作。
  • 快速查找和运行检验,按Ctrl Alt移我开始输入的检查或组的名称。从建议列表中选择所需的检查,然后指定所需的范围。
  • 您可以在“设置/首选项”对话框中快速找到一个您需要的设置,而不必浏览众多选项。请键入一些字符,在您的意见中,存在于选项描述中,并且设置列表将减少到匹配的字符。选择所需的条目,并查看包含已显示的输入字符的设置:

  • 按ALT SHIFT F10可以访问运行/调试下拉在主工具栏上,而不需要使用你的鼠标。
  • 你可以快速查看所有款式目前应用于HTML标签,通过右键单击标签名并选择从上下文菜单中显示的标签应用的样式:
  • 你可以快速查看引用符号使用快速定义图像(Ctrl Shift I)。底层的图像将在一个弹出的而不是一个单独的编辑器选项卡打开。
  • 可以重命名直接从HTML CSS选择器。位置在选择器插入要改名,按下Shift F6(重构|重命名)。
  • pycharm简化您的工作与CSS文件中的颜色。在编辑器的左栏区域中的颜色属性有相应的颜色的图标。单击颜色图标,选择所需的颜色从颜色选择器。
  • 保持你的源代码免费内置的拼写检查错误的帮助。所有的文字,包括评论,文本字符串和字符,检查对预定义的字典。所有的错别字都突出了,这使得你的选择正确的词汇任务,接受当前的拼写,或禁用检查。使用ALT键可以看到可用的操作列表。
  • 如果你在预先定义的字典中缺少单词,你可以创建你自己的字典。自定义词典仅仅是一个文本文件与DIC的延伸,一个字一个字的开始一个新的线。所有你要做的是指向你的字典存储的目录,在设置对话框的拼写。
  • 一个特殊的变种的代码完成功能,通过按下Ctrl空格两次让你完整的XML标记名称的命名空间不宣布在当前文件。如果命名空间未声明,则声明将自动生成。
  • 用于在上到类中的模式搜索,去符号和去文件弹出框,使用*和空间符号。*代表任何符号。在结束的空间意味着一个模式的结束,前面的字符串将被视为不只是一个前缀,而是一个完整的模式。建议的名称的列表将相应减少。
  • 所有你最不可或缺的VCS命令只是一个点击即可…选择风投| VCS操作上弹出主菜单,并与风投的命令,与当前上下文相关菜单:
  • You can comment and uncomment lines of code using Ctrl+斜杠.
    Ctrl+斜杠 comments or uncomments the current line or several selected lines with single line comments ({# in Django templates, or # in Python scripts).
    Pressing Ctrl+Shift+斜杠 for a selected block of source code in a Django template surrounds the block with {% comment %} and {% endcomment %} tags.
  • 你可以评论和注释掉的代码使用Ctrl斜杠。Ctrl斜杠评论或uncomments与单行注释当前行或多个选定的行({# in Django templates, or # in Python scripts).
    Pressing Ctrl+Shift+斜杠 for a selected block of source code in a Django template surrounds the block with {% comment %} and {% endcomment %} tags.
  • 导航栏是项目视图的一个快速选择。使用Alt家键盘快捷键来显示导航栏,和箭头键找到必要的文件或文件夹。
  • 变化的工具窗口中显示所有已删除,修改,和在一个单一的视图控制文件。使用键盘快捷键显示或隐藏此工具窗口。从变化的工具窗口可以执行所有必要的版本控制操作:提交更改,管理changelists,把资源进行版本控制,检查差异和更多。
  • 当你想抓住一些代码片段抛出的异常,在编辑器中选择它,按Ctrl Alt T(代码|环绕)和选择尝试/除。这将自动生成的除外条款。你可以在Python和Django的壳不离开IDE。只是选择运行Python控制台或在工具菜单中运行控制台。
  • 你可以在Python和Django的壳不离开IDE。只是选择运行Python控制台或在工具菜单中运行控制台。
  • Working in the interactive consoles, you don't need to memorise the command line syntax or available functions. Instead, you can use the familiar code completion Ctrl+空格. Moreover, from within the lookup list, you can press Ctrl+Q to view the item's documentation.在互动游戏机的工作,你不需要记住命令行语法或可用的功能。相反,你可以使用熟悉的代码完成Ctrl空格。此外,在查找表中,你可以按下Ctrl Q查看项目的文档。
  • If you have already spent some time working in the interactive consoles, you don't need to re-type the previously entered commands to repeat them. Instead, press Ctrl+向上箭头 and Ctrl+向下箭头 to scroll through the history of commands.如果你已经花了一些时间在互动游戏机上工作,你不需要重新输入以前输入的命令来重复他们。相反,按Ctrl向上箭头和Ctrl向下箭头滚动命令历史。
  • When you press Alt+Enter to invoke a quick fix or intention action, press the right arrow key to reveal the list of additional options.
    Depending on the context, you can choose to disable inspection, fix all problems, change inspection profile, etc.当你按下ALT键来调用一个快速修复或故意行为,按右箭头键显示额外的选项列表。根据上下文,您可以选择禁用检查、修复所有问题、更改检查配置文件等。
  • Ctrl+Click (on Windows) or Cmd+Click (on MacOS) a tab in the editor to navigate to any part of the file path. Select the necessary element in the drop-down, and the corresponding file path opens in an external browser (e.g., in the Explorer, if your OS is Windows).按住Ctrl键单击(Windows)或CMD点击(MacOS)在编辑选项卡导航到文件路径的任何部分。在下拉列表中选择必要的元素,并在外部浏览器中打开相应的文件路径(例如,在资源管理器中,如果您的操作系统是窗口)。

  • PyCharm lets you jump from your check-in comment to an issue in your task tracker.
    All you have to do is to define issue navigation patterns on the Version Control page of the Settings/Preferences dialog:pycharm让您从您的入住评论跳转到你的任务追踪问题。您所要做的就是在“设置/首选项”对话框的版本控制页上定义问题导航模式:
When you commit a changelist, and type the check-in comment, make sure it matches one of your issue navigation patterns. Later, when you browse through the changelists in the repository, such comments turn into hyperlinks:当你提交一个变更,和类型的入住点评,确保它符合你的一个问题,导航模式。后来,当你浏览库中的changelists变成超链接,这样的评论:

Clicking a hyperlink brings you directly to an issue in your task tracker.单击一个超链接将您直接带到任务跟踪中的一个问题。

  • The easiest way to run a utility of the manage.py task is to choose Run manage.py Task in the Tools menu, or press Ctrl+Alt+R.
    As you type the name of the utility you want to run, the lookup list shrinks to show the matching entries only.
    If you type an asterisk, PyCharm will show the complete list of all the available tasks.运行manage.py任务效用的最简单的方法是在“工具”菜单选择“运行manage.py任务,或按Ctrl Alt R当你输入你想运行该实用工具的名称,查找列表缩小显示匹配条目。如果你键入一个星号,pycharm将显示所有可用任务的完整列表。
  • It's very easy to navigate(操作) between the Django templates and referencing views.
    To do that, use the icons   and   in the left gutter of the editor.
  • Use the Switcher (Ctrl+Tab) to switch between open files and tool windows. Keeping Ctrl pressed, use the Up and Down arrow keys, Tab or Shift+Tab, Alt for navigation; use Delete or BackSpace to close editor tab or hide a tool window.使用交换机(Ctrl+Tab)之间切换打开的文件和工具窗口。保持CTRL键按下,使用向上和向下箭头键,制表符或Shift Tab,ALT导航;使用删除或退格键关闭编辑器选项卡或隐藏工具窗口。

  • You can easily open an external file for editing, if you just drag it from the Explorer or Finder to the editor.您可以很容易地打开一个外部文件进行编辑,如果你只是把它从资源管理器或查找器到编辑器。
  • There are two ways of closing all tabs in the editor, except the current one:
    First, right-click the editor tab, and choose Close Others on the context menu.
    Second, keeping the Alt key pressed, click X  on the editor tab.
  • You can jump directly to any deeply buried file, if you press Ctrl+Shift+N, and type just a couple of characters of the enclosing directories and file names:你可以直接跳到任何深埋的文件,如果你按下Ctrl Shift N型和几个字符的附上目录和文件名:

Use either a slash or a backslash as a delimiter.使用斜杠或反斜杠作为分隔符。

  • To open any class or file in the editor at the desired line, press Ctrl+Shift+N (Navigate | File), start typing the name, and choose the one from the suggestion list. Then type the colon (:) and a line number.
    The selected file will open with the caret at the specified line.在需要的线在编辑器中打开任何类或文件,按Ctrl Shift N(导航|文件),开始键入名称,并从列表中选择一个建议。然后键入冒号(:)和一个行数。所选的文件将在指定的行插入开放。
  • To view which line separators style is used in the current file, look at the Status Bar:要查看当前文件中使用的是哪行分隔符样式,看状态栏:

To change the current line ending style, just click the spinner.改变当前行的结尾方式,只需点击微调。

  • You do not need to open a file in the editor to change its line separator style. Use the Project tool window instead: select one or more files, or folders, point to File | Line Separators on the main menu, and then choose the desired line ending style.
    For a directory, new line separator applies recursively.您不需要在编辑器中打开一个文件,以更改其行分隔符样式。运用项目管理工具窗口:选择一个或多个文件,或文件夹,点主菜单上的文件|行分隔符,然后选择所需的行结束的方式。对于一个目录,新的行分隔符将递归应用。
  • To see the inheritance hierarchy for a selected class, press Ctrl+H (Navigate | Type Hierarchy). You can also invoke the hierarchy view right from the editor to see the hierarchy for the currently edited class.看到一个选定的类的继承层次,按Ctrl H(导航|类型层次结构)。您也可以从编辑器调用层次结构视图,以查看当前编辑的类的层次结构。
  • If you need more workspace, you can hide the tool windows bars: click   in the lower left corner.
    If necessary, you can show the tool window buttons just for a moment. To do that, press the key Alt (for Windows/*nix) or Cmd (for Mac) twice and keep it down. While the key is pressed, the tool window buttons are visible.如果你需要更多的工作空间,你可以隐藏工具窗口栏:点击左下角。如果有必要,你可以显示工具窗口按钮只是一个时刻。要做到这一点,按下键Alt(Windows / *nix)或CMD(Mac)两次停下来。当按键被按下时,工具窗口按钮是可见的。
  • You can exclude any file from your project. As a result, such a file will be ignored by indexing, inspection and code completion.
    In the Project tool window, select the file you want to ignore, and choose Mark as plain text in its context menu.
    If necessary, you can always return the file to its original type using the Mark as <file type> context menu command.您可以从项目中排除任何文件。因此,这样的文件将被忽略的索引,检查和代码完成。在“项目工具”窗口中,选择要忽略的文件,并在其上下文菜单中选择“马克”作为“纯文本”。如果有必要,可以使用标记为“文件类型”上下文菜单命令,将文件返回到它的原始类型。
  • When using basic code completion (Ctrl+空格), you don't need to type upper-case letters in CamelHump names. It is enough to type the initial letters of the camel names in lower case, and they will be smartly recognized.使用基本的代码完成时(按Ctrl空格),你不需要在CamelHump的名字大写字母型。它是足够低的情况下,骆驼的名字的首字母,他们会巧妙地认可。

This behavior is enabled, if None is selected from the Case sensitive completion drop-down list (the Code Completion page of the Editor settings).此行为被启用,如果没有从案例敏感的完成下拉列表中选择(编辑器设置的代码完成页)。

  • The keyboard shortcut Ctrl+K enables you to quickly invoke the Commit Changes dialog.
    This dialog shows all modifications in project, gives summary information of file status and suggests improvements before check-in.键盘快捷键Ctrl K可以快速调用提交更改”对话框。此对话框显示项目中的所有修改,给出了文件状态的摘要信息,并在签入前提出改进建议。
  • It is very easy to toggle between find and replace functionality.
    When you perform search and replace in a file, pressing Ctrl+F shows the search pane. Pressing Ctrl+R adds field, where you can type the replace string.
    While in the Find in Path dialog, you can switch to replace by pressing Ctrl+Shift+R. Same way, press Ctrl+Shift+F to hide the Replace with field, and switch to mere search.很容易在查找和替换功能之间切换。当您执行搜索和替换一个文件,按下Ctrl F显示搜索窗格。按Ctrl R加场,在那里你可以键入替换字符串。而在找到路径的对话框,你可以按ctrl + shift + R相同的方式代替,按Ctrl Shift F隐藏替换字段,并切换到单纯的搜索。
  • If you are working on a large project, with numerous TODO items, filter them by scopes.
    Use the Scope-Based tab in the TODO tool window to show only those items that pertain to the scope of interest. 如果你工作在一个大的项目,与众多的全部项目中,过滤掉的范围。使用todo工具窗口范围基础选项卡只显示这些项目涉及到的利益范围。
  • TODO tool window lets you preview each of the encountered TODO items – just click the preview button on the toolbar.todo工具窗口可以让你预览每个遇到的全部项目–只需单击工具栏上的“预览”按钮。

  • When working with a lengthy list of tasks, you don't need to delete them one by one. Select several tasks, using Shift or Control/Command keys, click the right arrow, and then click Remove.当使用一个冗长的任务列表时,你不需要一个一个地删除它们。选择几个任务,使用移动或控制/命令键,单击右箭头,然后单击“删除”按钮。
  • If there are too many run/debug configurations of the same type, you can group them into folders, and thus distinguish them visually.如果有太多的运行/调试配置相同的类型,您可以将它们分组到文件夹中,从而在视觉上区分它们。
  • If you are going to use Django live templates, make sure that Django is selected as the default Python template language in the Settings / Preferences dialog:如果你打算使用Django的生活模板,确保Django作为默认的Python模板语言在设置/首选项”对话框:
  • Live Templates let you generate many typical code constructs in seconds. For example, type for in a Django template。活的模板让你在几秒钟内生成许多典型的代码结构。例如,在Django的模板类型。

  • In the Live Templates settings, use speed search to find templates with certain text in the template abbreviation, body or description.
    Start typing the desired text, and the list of available templates will shrink to show matching templates only:在模板设置中,使用速度搜索来查找模板,在模板中有一定的文本模板的缩写、正文或说明。开始键入所需的文本,并且可用的模板列表将缩小到只显示匹配的模板:

  • While debugging, you might need an interactive console at hand... This is most easy. During the debugging session, switch to the Debugger Console, and then press the very lowest button in its toolbar.
    The console becomes interactive, and shows a prompt, where you can enter commands, and view output.在调试时,你可能需要一个互动的控制台…这是最容易的。在调试会话期间,切换到调试器控制台,然后按其工具栏中的最“最低”按钮。控制台变成了交互,并显示了一个提示,在那里您可以输入命令,并查看输出。

  • PyCharm allows configuring Python interpreters on the various stages of development:
    When a project is only being created (File | New Project, or Create New Project on the Welcome screen).
    In an already existing project (File | Settings - Project Interpreter).pycharm允许在开发的各个阶段配置Python解释器:当一个项目只有被创建(在欢迎屏幕上的文件|新项目,或创建新的项目)。在一个已经存在的项目(文件|设置项目解释器)。
  • Found yourself in a situation, when you want to use an interpreter located remotely? With PyCharm it is quite easy.
    To configure a remote interpreter, press Ctrl+Alt+S, and under the Project Settings. open the page Project Interpreter.
    Then click the gear button, and choose the option Add Remote:
    You can use this remote interpreter for your project, or just leave it as one of the available interpreters.发现自己在一个情况下,当你想使用一个远程定位的?与pycharm很容易。配置远程翻译,按Ctrl Alt S,和项目设置下。打开页面项目解释器。然后单击“齿轮”按钮,并选择“添加远程”:您可以使用此远程解释器为您的项目,或只是把它作为一个可用的解释器。
  • Right-clicking on a breakpoint (in the left gutter) invokes the context menu where you can quickly enable/disable the breakpoint or adjust its properties.右键单击一个断点(在左栏)调用上下文菜单,在那里你可以快速启用/禁用断点或调整其属性。
  • It is very easy to change the built-in web server port. In the Settings/Preferences dialog, expand the node Build, Execution, Deployment, and click Debugger. Then, use the "Built-in server port" spin box to set the new value.改变内置的Web服务器端口很容易。在“设置/首选项”对话框中,展开“节点生成、执行、部署”,并单击“调试器”。然后,使用“内置的服务器端口”旋转框来设置新的值。
  • For the embedded local terminal, you can define your favorite shell, default tab name, and other settings. Choose File | Settings (Windows/*nix) or PyCharm | Preferences (Mac) on the main menu, and then open the page Terminal.对于嵌入式本地终端,您可以定义您最喜欢的外壳、默认标签名称和其他设置。选择文件|设置(Windows / *nix)或pycharm |偏好(MAC)在主菜单,然后打开网页端。
  • You don't need to leave PyCharm to work with your favorite shell. Just choose Tools | Open Terminal on the main menu, and enjoy using the embedded local terminal.你不需要离开pycharm与您最喜爱的壳。只要选择工具|打开终端在主菜单,并享受使用嵌入式终端。

  • Find any action, symbol, or setting in PyCharm with Double Shift:发现任何行动,标志,或设置在双转移PyCharm:
  • Tune the PyCharm tool windows layout to make better use of your screen.
    Toggle between the vertical and side-by-side placement of the tool windows by Ctrl+click (Windows/*nix) or Cmd+click (Mac) on the splitter:调整pycharm工具窗口布局,更好的利用你的屏幕。按Ctrl键,单击工具窗口垂直并排放置之间切换(Windows / *nix)或按住Ctrl单击(Mac)上分器:

  • Use Basic Completion (Ctrl+空格) for completing words in text and comments in files of many different types.
    All the words from the current file that start with the typed prefix will appear in the lookup list.使用基本完成(按Ctrl空格)完成文本和在许多不同类型的文件的评论的话。从当前文件的所有的单词开始与类型的前缀将出现在查找列表中。

  • To open again one of the recent projects, use Reopen(on Windows and Linux)/Open Recent(on MacOS) on the File menu:

  • Speed up HTML, XML or CSS development with Emmet.
    Enable this framework in the CSS or HTML pages under the Emmet(Zen Coding) node of the Settings/Preferences dialog:

  • If you place the caret at certain symbol and press Ctrl+Alt+Shift+T, you will see the list of refactorings applicable to the current context.
  • When in the Code Completion lookup, you can ease the search by filtering the list with the help of the "camel words" prefixes.
  • When an autopopup completion is active, Ctrl+向下箭头 and Ctrl+向上箭头 will close it and move the caret down or up in the editor.
  • You can switch between sorting completion variants by relevance or alphabetically by using an icon at the bottom right:
  • The format of a regular expression can be rather complicated. To make sure you didn't miss some slash of quotation mark, place the caret somewhere in the expression you want to check, and press Alt+Enter.
    In the pop-up frame type a string that you think should match your regular expression. If the background turns green, you are lucky. If it turns red, then you have to look for a mistake.


  • When using autopopup Code Completion, you can select the first item using Ctrl+句点. The selected name is automatically entered in the editor followed by dot.
  • Enable the horizontal scrolling with the mouse wheel by holding the Shift key.
  • If you've changed a live template, it becomes blue. If you want to return to the original text, right-click such a blue template, and choose Restore defaults on the context menu.
  • In PyCharm, you can have multiple cursors. Having pressed Alt, click the left mouse button at the desired position to set additional cursors in the editor.
    Press Esc to remove all the additional cursors but one that resides at the line at caret.

  • Clone the cursor strictly upwards or downwards. To do that, press Ctrl+Shift+A twice, type Clone caret, and then choose the desired action.
  • When choosing a live template from a suggestion list, press Ctrl+Q to view quick documentation - to be sure you make a right choice:
  • You don't need to invoke quick documentation explicitly (Ctrl+Q) - if you just move your mouse pointer over the desired symbol, the quick documentation pop-up window will show automatically.
    To enable this feature, select the check box Show quick doc on mouse move in the General page of the editor settings:


  • PyCharm makes it possible to launch the embedded local terminal using keyboard only. Press Alt+F12, and see the terminal running.
  • Did you know that you can edit both opening and closing tags in XML/HTML files ?
    Make sure to select the check box Simultaneous <tag></tag> editing in the Smart keys page of the Editor settings/preferences.




下载和安装PyCharm 2016.3:

http://www.jetbrains.com/pycharm/download/#

汉化过程:

Pycharm这个python的IDE工具功能很多,很不错,个人很喜欢,但是全英文的界面,有时候使用还是有点小不爽,下面是一个汉化方法。

下载链接:http://down.51cto.com/data/2083211

汉化方法:

1)关闭pycharm,

2)备份pycharm软件lib目录下的resources_en.jar为resources_en_backup

3)复制resources_cn.jar文件到pycharn软件的lib目录中;

4)开启pycahrm

0 0