vim.opt_local.textwidth = vim.g.dotfiles.textwidth.gitcommit -- gw wraps at this value vim.opt_local.colorcolumn = "+1" -- Highlight one column after 'textwidth' vim.opt_local.tabstop = 2 -- CommonMark expects two spaces for indentation vim.opt_local.shiftwidth = 0 vim.opt_local.softtabstop = -1 vim.opt_local.expandtab = true -- Change tabs to spaces vim.opt_local.spelllang = "en_us" vim.opt_local.complete = { "w", -- other windows ".", -- current buffer } vim.api.nvim_create_autocmd("BufWinEnter", { desc = "Show cached git diff", group = vim.g.dotfiles.augroup, buffer = 0, callback = function() local MIN_COL_FOR_VERTICAL_SPLIT = 200 local vert_split = vim.o.columns >= MIN_COL_FOR_VERTICAL_SPLIT local gitcommit_window = vim.api.nvim_get_current_win() -- Open cached diff window (see `:help ft-gitcommit-plugin`) vim.cmd.DiffGitCached() vim.opt_local.winfixwidth = false vim.opt_local.winfixheight = false if vert_split then vim.cmd.wincmd("L") else vim.cmd.wincmd("J") end -- Enable English spell check in the original window -- If `'spell'` is set before `:DiffGitCached` it propagates to the cached diff window (that we don't want) vim.api.nvim_set_option_value("spell", true, { win = gitcommit_window }) -- The current window is the diff window vim.bo.filetype = "diff" vim.opt_local.foldenable = false end, })
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core;
namespace Tango.MachineStudio.MachineDesigner.Models
{
/// <summary>
/// Represents a hardware version collection.
/// </summary>
/// <seealso cref="Tango.Core.ExtendedObject" />
/// <seealso cref="Tango.MachineStudio.MachineDesigner.Models.IHasDifference" />
public class HardwareCollection : ExtendedObject, IHasDifference
{
/// <summary>
/// Gets or sets the name of the collection.
/// </summary>
public String CollectionName { get; set; }
/// <summary>
/// Gets or sets the components.
/// </summary>
public SynchronizedObservableCollection<HardwareComponent> Components { get; set; }
/// <summary>
/// Gets a value indicating whether this instance has differences.
/// </summary>
public bool HasDifferences
{
get
{
return Components.Any(item => item.HasDifferences);
}
}
/// <summary>
/// Initializes a new instance of the <see cref="HardwareCollection"/> class.
/// </summary>
public HardwareCollection()
{
Components = new SynchronizedObservableCollection<HardwareComponent>();
}
}
}